on master help sign in
Always run some benchmarks in quick mode
2f99867Harendra Kumar
bench.sh+14−4
@@ -1,6 +1,6 @@
1#!/bin/bash
1#!/bin/bash
2
2
3−DEV_BENCHMARKS="concurrent base adaptive"
3+DEV_BENCHMARKS="base concurrent adaptive"
4SERIAL_BENCHMARKS="linear linear-rate nested nested-unfold"
4SERIAL_BENCHMARKS="linear linear-rate nested nested-unfold"
5# parallel benchmark-suite is separated because we run it with a higher
5# parallel benchmark-suite is separated because we run it with a higher
6# heap size limit.
6# heap size limit.
@@ -10,7 +10,9 @@ ARRAY_BENCHMARKS="array unpinned-array prim-array small-array"
10INFINITE_BENCHMARKS="$SERIAL_BENCHMARKS linear-async nested-concurrent"
10INFINITE_BENCHMARKS="$SERIAL_BENCHMARKS linear-async nested-concurrent"
11FINITE_BENCHMARKS="$ARRAY_BENCHMARKS fileio parallel"
11FINITE_BENCHMARKS="$ARRAY_BENCHMARKS fileio parallel"
12
12
13+QUICK_BENCHMARKS="linear-rate concurrent adaptive"
13VIRTUAL_BENCHMARKS="array-cmp"
14VIRTUAL_BENCHMARKS="array-cmp"
15+
14ALL_BENCHMARKS="$SERIAL_BENCHMARKS $CONCURRENT_BENCHMARKS $ARRAY_BENCHMARKS $VIRTUAL_BENCHMARKS $DEV_BENCHMARKS"
16ALL_BENCHMARKS="$SERIAL_BENCHMARKS $CONCURRENT_BENCHMARKS $ARRAY_BENCHMARKS $VIRTUAL_BENCHMARKS $DEV_BENCHMARKS"
15
17
16list_benches () {
18list_benches () {
@@ -172,6 +174,7 @@ run_bench () {
172 local bench_name=$1
174 local bench_name=$1
173 local output_file=$(bench_output_file $bench_name)
175 local output_file=$(bench_output_file $bench_name)
174 local bench_prog
176 local bench_prog
177+ local quick_bench=0
175 bench_prog=$($GET_BENCH_PROG $bench_name) || \
178 bench_prog=$($GET_BENCH_PROG $bench_name) || \
176 die "Cannot find benchmark executable for benchmark $bench_name"
179 die "Cannot find benchmark executable for benchmark $bench_name"
177
180
@@ -179,13 +182,21 @@ run_bench () {
179
182
180 echo "Running benchmark $bench_name ..."
183 echo "Running benchmark $bench_name ..."
181
184
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+
182 local QUICK_OPTS="--quick --time-limit 1 --min-duration 0"
193 local QUICK_OPTS="--quick --time-limit 1 --min-duration 0"
183 local SPEED_OPTIONS
194 local SPEED_OPTIONS
184 if test "$LONG" -eq 0
195 if test "$LONG" -eq 0
185 then
196 then
186 if test "$SLOW" -eq 0
197 if test "$SLOW" -eq 0
187 then
198 then
188− if test "$QUICK" -eq 0
199+ if test "$QUICK" -eq 0 -a "$quick_bench" -eq 0
189 then
200 then
190 # reasonably quick
201 # reasonably quick
191 SPEED_OPTIONS="$QUICK_OPTS --min-samples 10"
202 SPEED_OPTIONS="$QUICK_OPTS --min-samples 10"
@@ -383,11 +394,10 @@ has_benchmark () {
383
394
384for i in $DEV_BENCHMARKS
395for i in $DEV_BENCHMARKS
385do
396do
386− if test $(has_benchmark $i) = "$i"
397+ if test "$(has_benchmark $i)" = "$i"
387 then
398 then
388 STACK_DEV_FLAG="--flag streamly:dev"
399 STACK_DEV_FLAG="--flag streamly:dev"
389 CABAL_DEV_FLAG="--flag dev"
400 CABAL_DEV_FLAG="--flag dev"
390−
391 fi
401 fi
392done
402done
393
403