Something went wrong. Try again.
An auto tiler for macOS
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536#!/bin/bashset -euo pipefail
cd "$(dirname "$0")/.."mode=${1:?Choose compare or record.}output=${2:-build/bench-results.json}baseline=${3:-}calibrate=${4:-0}case "$mode" in compare|record) ;; *) printf 'Choose compare or record.\n' >&2; exit 2 ;; esacif [[ $calibrate != 0 ]]; then printf 'Calibration scaling is no longer supported; retired instructions are the gate.\n' >&2 exit 2fiidentity=$(Scripts/parcel-dev.sh bench-identity)baseline=${baseline:-Benchmarks/baselines/$identity}if [[ $mode == compare && ! -f $baseline ]]; then printf 'no baseline for this machine, run make bench-record on a quiet machine\nExpected: %s\n' "$baseline" >&2 exit 1fiquiet=build/bench-quiet.jsonstatus=0Scripts/quiet-check.sh --output "$quiet" || status=$?if [[ $status != 0 ]]; then if [[ $status != 3 || $mode == record || ${BENCH_STRICT_QUIET:-0} == 1 ]]; then exit "$status"; fi printf 'Host is not quiet: instruction gate only; CPU/time budgets are diagnostic.\n'firecord=0if [[ $mode == record ]]; then record=1 printf 'Recording %s. Review the host conditions and results before committing.\n' "$baseline"fiScripts/swift-build.sh --prepareSWIFT_DETERMINISTIC_HASHING=1 PARCEL_BENCH=1 PARCEL_BENCH_RECORD="$record" PARCEL_BENCH_OUTPUT="$output" \ PARCEL_BENCH_BASELINE="$baseline" PARCEL_BENCH_QUIET="$quiet" \ swift test -c release --no-parallel --filter '^ParcelPerformanceTests\.'