#!/bin/bash # # Run all the benchmarks on a given machine. # # Usage: # ./auto.sh # # List of benchmarks: # # - osh-parser # - virtual-memory.sh -- vm-baseline, or mem-baseline # - osh-runtime (now called runtime.sh, or wild-run) # - oheap.sh? For size, it doesn't need to be run on every machine. # - startup.sh -- needs CSV # - this has many different snippets # - and it has strace set -o nounset set -o pipefail set -o errexit source test/common.sh # die proc _banner { echo ----- echo @Argv echo ----- } # Check that the code is correct before measuring performance! proc prereq { test/unit.sh all test/spec.sh all } proc measure-shells { local base_dir=$(1:-../benchmark-data) local provenance setglobal provenance = $[benchmarks/id.sh shell-provenance] # capture the filename benchmarks/vm-baseline.sh measure $provenance $base_dir/vm-baseline benchmarks/osh-runtime.sh measure $provenance $base_dir/osh-runtime benchmarks/osh-parser.sh measure $provenance $base_dir/osh-parser } proc measure-builds { local base_dir=$(1:-../benchmark-data) local provenance setglobal provenance = $[benchmarks/id.sh compiler-provenance] # capture the filename benchmarks/ovm-build.sh measure $provenance $base_dir/ovm-build } # Run the whole benchmark from a clean git checkout. # Before this, run scripts/release.sh benchmark-build. proc all { measure-shells measure-builds } # # Other # proc demo-tasks { local provenance=$1 # Strip everything after the first dot. local name=$[basename $provenance] local job_id=$(name%.provenance.txt) echo "JOB ID: $job_id" # This is the pattern for iterating over shells. cat $provenance | while read _ _ _ sh_path _ { for i in [1 2 3] { echo $i $sh_path } } } @Argv