@@ -2,7 +2,7 @@
3print_help () {
3print_help () {
4 echo "Usage: $0 "
4 echo "Usage: $0 "
5− echo " [--benchmarks <all|linear|linear-async|linear-rate|nested|fileio|array|base>]"
5+ echo " [--benchmarks <all|linear|linear-async|linear-rate|nested|concurrent|fileio|array|base>]"
6 echo " [--group-diff]"
6 echo " [--group-diff]"
7 echo " [--graphs]"
7 echo " [--graphs]"
8 echo " [--no-measure]"
8 echo " [--no-measure]"
@@ -231,7 +231,7 @@ run_reports() {
231#-----------------------------------------------------------------------------
231#-----------------------------------------------------------------------------
233DEFAULT_BENCHMARKS="linear"
233DEFAULT_BENCHMARKS="linear"
234−ALL_BENCHMARKS="linear linear-async linear-rate nested fileio array base"
234+ALL_BENCHMARKS="linear linear-async linear-rate nested concurrrent fileio array base"
235GROUP_DIFF=0
235GROUP_DIFF=0
@@ -254,21 +254,6 @@ cabal_which() {
254 find dist-newstyle -type f -path "*${GHC_VERSION}*/$1"
254 find dist-newstyle -type f -path "*${GHC_VERSION}*/$1"
257−if test "$USE_STACK" = "1"
259− WHICH_COMMAND="stack exec which"
260− BUILD_CHART_EXE="stack build --flag streamly:dev"
261− GET_BENCH_PROG=stack_bench_prog
262− BUILD_BENCH="stack build $STACK_BUILD_FLAGS --flags "streamly:benchmark" --bench --no-run-benchmarks"
264− # XXX cabal issue "cabal v2-exec which" cannot find benchmark/test executables
265− #WHICH_COMMAND="cabal v2-exec which"
266− WHICH_COMMAND=cabal_which
267− BUILD_CHART_EXE="cabal v2-build --flags dev chart"
268− GET_BENCH_PROG=cabal_bench_prog
269− BUILD_BENCH="cabal v2-build $CABAL_BUILD_FLAGS --flag benchmark --enable-benchmarks"
272#-----------------------------------------------------------------------------
257#-----------------------------------------------------------------------------
273# Read command line
258# Read command line
274#-----------------------------------------------------------------------------
259#-----------------------------------------------------------------------------
@@ -305,6 +290,27 @@ then
305 CABAL_BUILD_FLAGS="--flags dev"
290 CABAL_BUILD_FLAGS="--flags dev"
293+if echo "$BENCHMARKS" | grep -q concurrent
295+ STACK_BUILD_FLAGS="--flag streamly:dev"
296+ CABAL_BUILD_FLAGS="--flags dev"
299+if test "$USE_STACK" = "1"
301+ WHICH_COMMAND="stack exec which"
302+ BUILD_CHART_EXE="stack build --flag streamly:dev"
303+ GET_BENCH_PROG=stack_bench_prog
304+ BUILD_BENCH="stack build $STACK_BUILD_FLAGS --flags "streamly:benchmark" --bench --no-run-benchmarks"
306+ # XXX cabal issue "cabal v2-exec which" cannot find benchmark/test executables
307+ #WHICH_COMMAND="cabal v2-exec which"
308+ WHICH_COMMAND=cabal_which
309+ BUILD_CHART_EXE="cabal v2-build --flags dev chart"
310+ GET_BENCH_PROG=cabal_bench_prog
311+ BUILD_BENCH="cabal v2-build $CABAL_BUILD_FLAGS --flag benchmark --enable-benchmarks"
308#-----------------------------------------------------------------------------
314#-----------------------------------------------------------------------------
309# Build stuff
315# Build stuff
310#-----------------------------------------------------------------------------
316#-----------------------------------------------------------------------------
@@ -319,6 +325,7 @@ build_report_progs "$BENCHMARKS"
320if test "$MEASURE" = "1"
326if test "$MEASURE" = "1"
322 $BUILD_BENCH || die "build failed"
329 $BUILD_BENCH || die "build failed"
323 run_measurements "$BENCHMARKS"
330 run_measurements "$BENCHMARKS"