@@ -1,5 +1,9 @@
11#!/usr/bin/env bash
22
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; }
6+
37# Customization options
48bench_config () {
59 BENCH_REPORT_DIR=benchmark/bench-report
@@ -11,117 +15,11 @@ bench_config () {
1115}
1216
1317#------------------------------------------------------------------------------
14−# test and benchmark groups
18+# benchmark groups
1519#------------------------------------------------------------------------------
1620
17−# IMPORTANT NOTE: the names "_grp" and "_cmp" suffixes are special, do
18−# not rename them to something else.
19−
2021bench_targets () {
21− base_stream_grp="\
22− `bench_only Data.Stream.StreamD` \
23− `bench_only Data.Stream.StreamK` \
24− `bench_only Data.Stream.StreamDK`"
25−
26− prelude_serial_grp="\
27− Prelude.Serial \
28− Prelude.WSerial \
29− Prelude.ZipSerial"
30−
31− prelude_concurrent_grp="\
32− Prelude.Async \
33− Prelude.WAsync \
34− Prelude.Ahead \
35− Prelude.Parallel \
36− Prelude.ZipAsync"
37−
38− prelude_other_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`"
46−
47− array_grp="\
48− Data.Array \
49− Data.Array.Foreign \
50− Data.Array.Prim \
51− Data.SmallArray \
52− Data.Array.Prim.Pinned"
53−
54− base_parser_grp="\
55− Data.Parser.ParserD \
56− `bench_only Data.Parser.ParserK`"
57−
58− parser_grp="\
59− Data.Fold \
60− Data.Parser"
61−
62− list_grp="\
63− `test_only Data.List.Base` \
64− `test_only Data.List`"
65−
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.
71−
72− infinite_grp="\
73− $prelude_serial_grp \
74− $prelude_concurrent_grp \
75− `bench_only Prelude.Rate`"
76−
77− #------------------------------------------------------------------------------
78− # Benchmark comparison groups
79− #------------------------------------------------------------------------------
80−
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
90−
91− COMPARISONS="\
92− base_stream_cmp \
93− serial_wserial_cmp \
94− serial_async_cmp \
95− concurrent_cmp \
96− array_cmp \
97− pinned_array_cmp \
98− base_parser_cmp"
99−
100− #------------------------------------------------------------------------------
101− # All test/benchmark modules must be in at least one of these
102− #------------------------------------------------------------------------------
103−
104− # All groups
105− GROUP_TARGETS="\
106− base_stream_grp \
107− prelude_serial_grp \
108− prelude_concurrent_grp \
109− prelude_other_grp \
110− array_grp \
111− base_parser_grp \
112− parser_grp \
113− list_grp \
114− infinite_grp"
115−
116− # Not in any groups
117− INDIVIDUAL_TARGETS="\
118− Data.Unfold \
119− Unicode.Stream \
120− FileSystem.Handle \
121− `test_only FileSystem.Event` \
122− `test_only Network.Socket` \
123− `test_only Network.Inet.TCP` \
124− `test_only version-bounds`"
22+ targets
12523}
12624
12725#------------------------------------------------------------------------------