Download this file
| 1 | #!/usr/bin/env bash |
| 2 | # Network measurements for one live app, from docs-t1: the shared suite, |
| 3 | # time to first byte (empty and 50 items), page weight, then the six load |
| 4 | # runs. Run apps one at a time, never in parallel. |
| 5 | # scripts/measure-live.sh <slug> |
| 6 | set -euo pipefail |
| 7 | slug=$1 |
| 8 | cd "$(dirname "$0")/.." |
| 9 | url=https://$(cd harness && go run ./cmd/host "$slug") |
| 10 | out=$(mktemp -d -p "${TMPDIR:-$HOME/.cache}") |
| 11 | trap 'rm -rf "$out"' EXIT |
| 12 | scripts/test-app.sh "$url" "$out/suite.json" >/dev/null 2>&1 || true |
| 13 | bakeoff behaviour --slug "$slug" --file "$out/suite.json" |
| 14 | bakeoff ttfb --slug "$slug" |
| 15 | bakeoff weight --slug "$slug" |
| 16 | ulimit -n 8192 2>/dev/null || true |
| 17 | bakeoff load --slug "$slug" |
| 18 | |