@@ -1,6 +1,6 @@
11#!/bin/bash
22
3−DEV_BENCHMARKS="concurrent base adaptive"
3+DEV_BENCHMARKS="base concurrent adaptive"
44SERIAL_BENCHMARKS="linear linear-rate nested nested-unfold"
55# parallel benchmark-suite is separated because we run it with a higher
66# heap size limit.
@@ -10,7 +10,9 @@ ARRAY_BENCHMARKS="array unpinned-array prim-array small-array"
1010INFINITE_BENCHMARKS="$SERIAL_BENCHMARKS linear-async nested-concurrent"
1111FINITE_BENCHMARKS="$ARRAY_BENCHMARKS fileio parallel"
1212
13+QUICK_BENCHMARKS="linear-rate concurrent adaptive"
1314VIRTUAL_BENCHMARKS="array-cmp"
15+
1416ALL_BENCHMARKS="$SERIAL_BENCHMARKS $CONCURRENT_BENCHMARKS $ARRAY_BENCHMARKS $VIRTUAL_BENCHMARKS $DEV_BENCHMARKS"
1517
1618list_benches () {
@@ -172,6 +174,7 @@ run_bench () {
172174 local bench_name=$1
173175 local output_file=$(bench_output_file $bench_name)
174176 local bench_prog
177+ local quick_bench=0
175178 bench_prog=$($GET_BENCH_PROG $bench_name) || \
176179 die "Cannot find benchmark executable for benchmark $bench_name"
177180
@@ -179,13 +182,21 @@ run_bench () {
179182
180183 echo "Running benchmark $bench_name ..."
181184
185+ for i in $QUICK_BENCHMARKS
186+ do
187+ if test "$(has_benchmark $i)" = "$bench_name"
188+ then
189+ quick_bench=1
190+ fi
191+ done
192+
182193 local QUICK_OPTS="--quick --time-limit 1 --min-duration 0"
183194 local SPEED_OPTIONS
184195 if test "$LONG" -eq 0
185196 then
186197 if test "$SLOW" -eq 0
187198 then
188− if test "$QUICK" -eq 0
199+ if test "$QUICK" -eq 0 -a "$quick_bench" -eq 0
189200 then
190201 # reasonably quick
191202 SPEED_OPTIONS="$QUICK_OPTS --min-samples 10"
@@ -383,11 +394,10 @@ has_benchmark () {
383394
384395for i in $DEV_BENCHMARKS
385396do
386− if test $(has_benchmark $i) = "$i"
397+ if test "$(has_benchmark $i)" = "$i"
387398 then
388399 STACK_DEV_FLAG="--flag streamly:dev"
389400 CABAL_DEV_FLAG="--flag dev"
390−
391401 fi
392402done
393403