Download this file
| 1 | #!/usr/bin/env bash |
| 2 | # Build measurements for one app, in its worktree: cold, warm and |
| 3 | # one-line-change builds of the arm64 binary (cold once; warm and edit median of 3), its size, and |
| 4 | # the code counts. Run apps one at a time, with nothing else heavy running. |
| 5 | # scripts/measure-build.sh <slug> [runs] |
| 6 | set -euo pipefail |
| 7 | slug=$1 runs=${2:-3} |
| 8 | cd "$(dirname "$0")/.." |
| 9 | source scripts/env.sh |
| 10 | dir=.worktrees/$slug/apps/$slug |
| 11 | bakeoff code --slug "$slug" --dir "$dir" |
| 12 | bakeoff build --slug "$slug" --dir "$dir" --cold-runs 1 --runs "$runs" |
| 13 | |