@@ -1,5 +1,9 @@
1#!/usr/bin/env bash
1#!/usr/bin/env bash
3+BENCH_CONFIG_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" &> /dev/null && pwd)"
4+source $BENCH_CONFIG_DIR/targets.sh \
5+ || { echo "Cannot source $BENCH_CONFIG_DIR/targets.sh"; exit 1; }
3# Customization options
7# Customization options
4bench_config () {
8bench_config () {
5 BENCH_REPORT_DIR=benchmark/bench-report
9 BENCH_REPORT_DIR=benchmark/bench-report
@@ -11,117 +15,11 @@ bench_config () {
13#------------------------------------------------------------------------------
17#------------------------------------------------------------------------------
14−# test and benchmark groups
18+# benchmark groups
15#------------------------------------------------------------------------------
19#------------------------------------------------------------------------------
17−# IMPORTANT NOTE: the names "_grp" and "_cmp" suffixes are special, do
18−# not rename them to something else.
20bench_targets () {
21bench_targets () {
21− base_stream_grp="\
22+ targets
22− `bench_only Data.Stream.StreamD` \
23− `bench_only Data.Stream.StreamK` \
24− `bench_only Data.Stream.StreamDK`"
26− prelude_serial_grp="\
31− prelude_concurrent_grp="\
39− `test_only Prelude` \
40− $(test_only $(dev_build Prelude.Rate)) \
41− `bench_only Prelude.Rate` \
42− `test_only Prelude.Fold` \
43− `test_only Prelude.Concurrent` \
44− $(bench_only $(dev_build Prelude.Concurrent)) \
45− `bench_only Prelude.Adaptive`"
52− Data.Array.Prim.Pinned"
55− Data.Parser.ParserD \
56− `bench_only Data.Parser.ParserK`"
63− `test_only Data.List.Base` \
64− `test_only Data.List`"
66− #------------------------------------------------------------------------------
67− # Streaming vs non-streaming
68− #------------------------------------------------------------------------------
69− # The "o-1-space" groups of these benchmarks are run with long stream
70− # sizes when --long option is used.
73− $prelude_serial_grp \
74− $prelude_concurrent_grp \
75− `bench_only Prelude.Rate`"
77− #------------------------------------------------------------------------------
78− # Benchmark comparison groups
79− #------------------------------------------------------------------------------
81− # *_cmp denotes a comparison benchmark, the benchmarks provided in *_cmp
82− # variables are compared with each other
83− base_stream_cmp="Data.Stream.StreamD Data.Stream.StreamK"
84− serial_wserial_cmp="Prelude.Serial Prelude.WSerial"
85− serial_async_cmp="Prelude.Serial Prelude.Async"
86− concurrent_cmp="Prelude.Async Prelude.WAsync Prelude.Ahead Prelude.Parallel"
87− array_cmp="Memory.Array Data.Array.Prim Data.Array Data.Array.Prim.Pinned"
88− pinned_array_cmp="Memory.Array Data.Array.Prim.Pinned"
89− base_parser_cmp=$base_parser_grp
100− #------------------------------------------------------------------------------
101− # All test/benchmark modules must be in at least one of these
102− #------------------------------------------------------------------------------
107− prelude_serial_grp \
108− prelude_concurrent_grp \
117− INDIVIDUAL_TARGETS="\
121− `test_only FileSystem.Event` \
122− `test_only Network.Socket` \
123− `test_only Network.Inet.TCP` \
124− `test_only version-bounds`"
127#------------------------------------------------------------------------------
25#------------------------------------------------------------------------------