aien-architecture-mv
Canonical architecture for the AIEN ecosystem: flows, boundaries, ADRs, and the map from design to implementation repositories.
Brought by drakestapleton
aien-architecture-mv / scripts / pipeline-proofs / 00-measure.sh
| 1 | #!/usr/bin/env bash |
| 2 | # 00: baseline timings of the crumb tool on a clean clone (no assertion beyond "the commands run"). |
| 3 | # Records: compile (at HEAD, expected 0 rewritten), verify, status, context lookup on the deepest crumb path. |
| 4 | here="$(cd "$(dirname "$0")" && pwd)"; . "$here/lib.sh" |
| 5 | proof_begin 00 "crumb timings on a clean clone" "${1:-}" |
| 6 | clone_repo "$TMP/a"; cd "$TMP/a" || exit 1 |
| 7 | L=$(leaf_crumb_dir .) || L=. |
| 8 | F=$(tracked_file_in . "$L") |
| 9 | measure compile_at_head $CRUMB compile .; note "$(echo "$OUT" | tail -1)"; check "compile exits 0" [ "$RC" -eq 0 ] |
| 10 | measure verify $CRUMB verify .; note "$(echo "$OUT" | tail -1)"; check "verify exits 0 at HEAD" [ "$RC" -eq 0 ] |
| 11 | measure status $CRUMB status .; note "$(echo "$OUT" | tail -1)"; check "status exits 0" [ "$RC" -eq 0 ] |
| 12 | measure context_root $CRUMB context .; check "context . exits 0" [ "$RC" -eq 0 ] |
| 13 | measure context_leaf $CRUMB context "$F"; check "context $F exits 0" [ "$RC" -eq 0 ] |
| 14 | num "crumbs=$(crumb_dirs . | wc -l)"; num "tracked_files=$(git ls-files | wc -l)"; num "leaf=$L" |
| 15 | proof_end |