Files
claudeandClaude Opus 5.5 75bf153462
test / test (push) Successful in 2m4s
Report header: fewer badges, launch command in a dropdown
results.html goes from 24 badges to 14. The model badge takes over the
model_file details (org/name and size), PCIe, ReBAR and the power limit join
the gpu badge, corpus, passes, temperature and prefix cache join the run badge,
and the endpoint badge goes. Launch and env flags become a dropdown holding the
real launch command from server-cmd.txt.

Only the display changes: results.json and meta.json keep every value, including
the hash and the standard-model verdict, so no version bump. If the page cannot
be read, bench.sh warns and leaves the report as BetterBench wrote it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 10:40:00 +01:00

51 lines
1.7 KiB
Bash
Executable File

#!/bin/sh
# build.sh - pack dev/ into the one bench.sh at the repo root, which is all
# people download. It unpacks the helpers to a temp dir and exec's dev's
# bench.sh from there, with results and bench.local.env next to itself; that
# script removes the temp dir (BENCH_UNPACKED) when it exits.
#
# usage: dev/build.sh (then commit the root bench.sh with dev/)
# dev/build.sh --check (exit 1 if the root bench.sh is out of date)
set -eu
dev=$(cd "$(dirname "$0")" && pwd)
out="$dev/../bench.sh"
files="bench.sh collect-env.sh gpu-power.sh mem-bw.py report-header.py config.json standard.env models.txt"
eof=__BENCH_STANDARD_EOF__
. "$dev/standard.env"
for f in $files; do
if grep -q "$eof" "$dev/$f"; then echo "build.sh: $f contains $eof" >&2; exit 1; fi
done
tmp=$(mktemp)
trap 'rm -f "$tmp"' EXIT
{
cat <<EOF
#!/bin/sh
# bench.sh - bench-standard $STANDARD_VERSION, everything in one file: run ./bench.sh --help
# Generated by dev/build.sh from dev/ - edit there and rebuild, not here.
set -eu
BENCH_HOME=\${BENCH_HOME:-\$(cd "\$(dirname "\$0")" && pwd)}; export BENCH_HOME
d=\$(mktemp -d)
trap 'rm -rf "\$d"' EXIT
trap 'rm -rf "\$d"; exit 130' INT
trap 'rm -rf "\$d"; exit 143' TERM
EOF
for f in $files; do
printf "cat > \"\$d/%s\" <<'%s'\n" "$f" "$eof"
cat "$dev/$f"
printf '%s\n' "$eof"
done
printf 'trap - EXIT INT TERM\n'
printf 'BENCH_UNPACKED=$d exec sh "$d/bench.sh" "$@"\n'
} > "$tmp"
if [ "${1:-}" = --check ]; then
cmp -s "$tmp" "$out" || { echo "build.sh: bench.sh is out of date, run dev/build.sh" >&2; exit 1; }
echo "bench.sh is up to date"
else
cp "$tmp" "$out" && chmod +x "$out"
echo "built $(cd "$dev/.." && pwd)/bench.sh ($(wc -c < "$out") bytes)"
fi