Both run-baseline.sh and run-suite.sh now support: - --max-size GB: skip models larger than N GB (prevents OOM) - --category LIST: filter by catalog category (smoke,dense,moe) - --skip-longctx: skip 32K context tests (saves time + memory) - --reps N: configure repetition count - --help: shows usage with examples Safe pre-optimization run: benchmark baseline --max-size 20 --skip-longctx Full post-optimization: benchmark baseline (no filters, all models + longctx) Also: 4 new BATS tests for flag parsing (98 total, all passing) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
33 lines
1.3 KiB
Bash
Executable File
33 lines
1.3 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Benchmark dispatcher
|
|
set -euo pipefail
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
|
|
case "${1:-help}" in
|
|
setup) exec bash "$SCRIPT_DIR/scripts/benchmark/setup.sh" ;;
|
|
baseline) exec bash "$SCRIPT_DIR/scripts/benchmark/run-baseline.sh" "${@:2}" ;;
|
|
run) exec bash "$SCRIPT_DIR/scripts/benchmark/run-suite.sh" "${@:2}" ;;
|
|
compare) exec bash "$SCRIPT_DIR/scripts/benchmark/compare.sh" "${@:2}" ;;
|
|
*)
|
|
echo "Usage: benchmark <command> [options]"
|
|
echo ""
|
|
echo "Commands:"
|
|
echo " setup Ensure toolboxes and test models are ready"
|
|
echo " baseline Capture pre-optimization baseline"
|
|
echo " run Run full benchmark suite"
|
|
echo " compare Compare two runs (DIR1 DIR2)"
|
|
echo ""
|
|
echo "Filtering options (baseline and run):"
|
|
echo " --max-size GB Only models up to this file size"
|
|
echo " --category LIST Comma-separated: smoke,dense,moe"
|
|
echo " --skip-longctx Skip long-context (32K) tests"
|
|
echo " --reps N Standard test repetitions (default: 5)"
|
|
echo ""
|
|
echo "Examples:"
|
|
echo " benchmark baseline --max-size 20 --skip-longctx"
|
|
echo " benchmark run --tag post-opt --category moe"
|
|
exit 1
|
|
;;
|
|
esac
|