@@ -3,13 +3,16 @@
33print_help () {
44 echo "Usage: $0 "
55 echo " [--compare] [--base commit] [--candidate commit]"
6− echo " [--benchmark <linear|linear-async|linear-rate|nested|base>]"
6+ echo " [--benchmarks <all|linear|linear-async|linear-rate|nested|base>]"
77 echo " [--graphs]"
88 echo " [--slow]"
99 echo " [--no-measure]"
1010 echo " [--append] "
1111 echo " -- <gauge options>"
1212 echo
13+ echo "Multiple benchmarks can be specified as a space separate list"
14+ echo " e.g. --benchmarks \"linear nested\""
15+ echo
1316 echo "When using --compare, by default comparative chart of HEAD^ vs HEAD"
1417 echo "commit is generated, in the 'charts' directory."
1518 echo "Use --base and --candidate to select the commits to compare."
@@ -29,10 +32,11 @@ set_benchmarks() {
2932 if test -z "$BENCHMARKS"
3033 then
3134 BENCHMARKS=$DEFAULT_BENCHMARKS
32− echo "Using default benchmark suite [$BENCHMARKS], use --benchmark to specify another"
33− else
34− echo "Using benchmark suite [$BENCHMARKS]"
35+ elif test "$BENCHMARKS" = "all"
36+ then
37+ BENCHMARKS=$ALL_BENCHMARKS
3538 fi
39+ echo "Using benchmark suites [$BENCHMARKS]"
3640}
3741
3842# $1: benchmark name (linear, nested, base)
@@ -155,12 +159,14 @@ run_benches_comparing() {
155159 echo "Checking out base commit [$BASE] for benchmarking"
156160 git checkout "$BASE" || die "Checkout of base commit [$BASE] failed"
157161
162+ $STACK build --bench --no-run-benchmarks || die "build failed"
158163 run_benches "$bench_list"
159164
160165 echo "Checking out candidate commit [$CANDIDATE] for benchmarking"
161166 git checkout "$CANDIDATE" || \
162167 die "Checkout of candidate [$CANDIDATE] commit failed"
163168
169+ $STACK build --bench --no-run-benchmarks || die "build failed"
164170 run_benches "$bench_list"
165171 # XXX reset back to the original commit
166172}
@@ -209,6 +215,7 @@ run_reports() {
209215#-----------------------------------------------------------------------------
210216
211217DEFAULT_BENCHMARKS="linear"
218+ALL_BENCHMARKS="linear linear-async linear-rate nested base"
212219
213220COMPARE=0
214221BASE=
@@ -235,7 +242,7 @@ do
235242 -h|--help|help) print_help ;;
236243 --slow) SPEED_OPTIONS="--min-duration 0"; shift ;;
237244 --append) APPEND=1; shift ;;
238− --benchmark) shift; BENCHMARKS=$1; shift ;;
245+ --benchmarks) shift; BENCHMARKS=$1; shift ;;
239246 --base) shift; BASE=$1; shift ;;
240247 --candidate) shift; CANDIDATE=$1; shift ;;
241248 --compare) COMPARE=1; shift ;;