on master help sign in
Add long benchmark support
commitcc07da8fd8a4df2ad83769a2b180381f214675b7 authorHarendra Kumar <harendra.kumar@gmail.com> dateWed 15 Jan 2020, 08:07 (7 years ago) parent71f6196
1 file changed+22−5
bench.sh+22−5
bench.sh+22−5
@@ -1,12 +1,15 @@
11#!/bin/bash
22
3+ALL_BENCHMARKS="linear linear-async linear-rate nested nested-concurrent nested-unfold concurrent fileio array base"
4+
35print_help () {
46 echo "Usage: $0 "
5− echo " [--benchmarks <all|linear|linear-async|linear-rate|nested|concurrent|fileio|array|base>]"
7+ echo " [--benchmarks <all|linear|linear-async|linear-rate|nested|nested-concurrent|nested-unfold|concurrent|fileio|array|base>]"
68 echo " [--group-diff]"
79 echo " [--graphs]"
810 echo " [--no-measure]"
9− echo " [--append] "
11+ echo " [--append]"
12+ echo " [--long]"
1013 echo " [--compare] [--base commit] [--candidate commit]"
1114 echo " [--slow]"
1215 echo " -- <gauge options>"
@@ -144,6 +147,19 @@ run_bench () {
144147
145148 echo "Running benchmark $bench_name ..."
146149
150+ local SPEED_OPTIONS
151+ if test "$LONG" -eq 0
152+ then
153+ if test "$SLOW" -eq 0
154+ then
155+ SPEED_OPTIONS="--quick --min-samples 10 --time-limit 1 --min-duration 0"
156+ else
157+ SPEED_OPTIONS="--min-duration 0"
158+ fi
159+ else
160+ SPEED_OPTIONS="--stream-size 10000000 -v2 --quick --include-first-iter --time-limit 1 --min-duration 0"
161+ fi
162+
147163 $bench_prog $SPEED_OPTIONS \
148164 --csvraw=$output_file \
149165 -v 2 \
@@ -231,7 +247,6 @@ run_reports() {
231247#-----------------------------------------------------------------------------
232248
233249DEFAULT_BENCHMARKS="linear"
234−ALL_BENCHMARKS="linear linear-async linear-rate nested nested-concurrent concurrent fileio array base"
235250GROUP_DIFF=0
236251
237252COMPARE=0
@@ -239,10 +254,11 @@ BASE=
239254CANDIDATE=
240255
241256APPEND=0
257+SLOW=0
258+LONG=0
242259RAW=0
243260GRAPH=0
244261MEASURE=1
245−SPEED_OPTIONS="--quick --min-samples 10 --time-limit 1 --min-duration 0"
246262
247263GAUGE_ARGS=
248264BUILD_ONCE=0
@@ -263,7 +279,7 @@ do
263279 case $1 in
264280 -h|--help|help) print_help ;;
265281 # options with arguments
266− --slow) SPEED_OPTIONS="--min-duration 0"; shift ;;
282+ --slow) SLOW=1; shift ;;
267283 --benchmarks) shift; BENCHMARKS=$1; shift ;;
268284 --base) shift; BASE=$1; shift ;;
269285 --candidate) shift; CANDIDATE=$1; shift ;;
@@ -271,6 +287,7 @@ do
271287 --compare) COMPARE=1; shift ;;
272288 --raw) RAW=1; shift ;;
273289 --append) APPEND=1; shift ;;
290+ --long) LONG=1; shift ;;
274291 --group-diff) GROUP_DIFF=1; shift ;;
275292 --graphs) GRAPH=1; shift ;;
276293 --no-measure) MEASURE=0; shift ;;