on master help sign in
Add FileSystem.Handle benchmark, use --time-limit 0
37bcdcdHarendra Kumar
bench.sh+9−7
@@ -1,11 +1,12 @@
1#!/bin/bash
1#!/bin/bash
2
2
3−# Note "_grp" and "_cmp" suffixes are special, do not rename them to something
4−# else.
5−
6#------------------------------------------------------------------------------
3#------------------------------------------------------------------------------
7# Benchmark groups
4# Benchmark groups
8#------------------------------------------------------------------------------
5#------------------------------------------------------------------------------
6+
7+# IMPORTANT NOTE: the names "_grp" and "_cmp" suffixes are special, do
8+# not rename them to something else.
9+
9base_stream_grp="\
10base_stream_grp="\
10 Data.Stream.StreamD \
11 Data.Stream.StreamD \
11 Data.Stream.StreamK \
12 Data.Stream.StreamK \
@@ -72,7 +73,8 @@ all_grp="\
72 $prelude_concurrent_grp \
73 $prelude_concurrent_grp \
73 $array_grp \
74 $array_grp \
74 $parser_grp \
75 $parser_grp \
75− Data.Unfold"
76+ Data.Unfold \
77+ FileSystem.Handle"
76
78
77ALL_BENCH_GROUPS="\
79ALL_BENCH_GROUPS="\
78 all_grp \
80 all_grp \
@@ -287,7 +289,7 @@ run_bench () {
287
289
288 echo "Running benchmark $bench_name ..."
290 echo "Running benchmark $bench_name ..."
289
291
290− local QUICK_OPTS="--quick --time-limit 1 --min-duration 0"
292+ local QUICK_OPTS="--quick --min-duration 0"
291 local SPEED_OPTIONS
293 local SPEED_OPTIONS
292 if test "$LONG" -eq 0
294 if test "$LONG" -eq 0
293 then
295 then
@@ -297,10 +299,10 @@ run_bench () {
297 if test "$QUICK_MODE" -eq 0
299 if test "$QUICK_MODE" -eq 0
298 then
300 then
299 # default mode, not super quick, not slow
301 # default mode, not super quick, not slow
300− SPEED_OPTIONS="$QUICK_OPTS --min-samples 10"
302+ SPEED_OPTIONS="$QUICK_OPTS --min-samples 10 --time-limit 1"
301 else
303 else
302 # super quick but less accurate
304 # super quick but less accurate
303− SPEED_OPTIONS="$QUICK_OPTS --include-first-iter"
305+ SPEED_OPTIONS="$QUICK_OPTS --time-limit 0 --include-first-iter"
304 fi
306 fi
305 else
307 else
306 # Slow but more accurate mode
308 # Slow but more accurate mode
bin/bench-exec-one.sh+23−16
@@ -80,21 +80,26 @@ bench_rts_opts_specific () {
80# Speed options
80# Speed options
81#------------------------------------------------------------------------------
81#------------------------------------------------------------------------------
82
82
83−if test -n "$QUICK_MODE"
83+SUPER_QUICK_OPTIONS="--quick --min-duration 0 --time-limit 0 --include-first-iter"
84−then
84+QUICKER_OPTIONS="--min-samples 3 --time-limit 1"
85+
86+# For certain long benchmarks if the user has not requested super quick
87+# mode we anyway use a slightly quicker mode.
88+use_quicker_mode () {
85− if test "$QUICK_MODE" -eq 0
89+ if test -n "$QUICK_MODE"
86 then
90 then
87− QUICK_OPTIONS="--min-samples 3"
91+ if test "$QUICK_MODE" -eq 0
92+ then
93+ echo $QUICKER_OPTIONS
94+ fi
88 fi
95 fi
89−fi
96+}
90−SUPER_QUICK_OPTIONS="--min-samples 1 --include-first-iter"
91
97
92bench_exe_quick_opts () {
98bench_exe_quick_opts () {
93 case "$1" in
99 case "$1" in
94 Prelude.Concurrent) echo -n "$SUPER_QUICK_OPTIONS" ;;
100 Prelude.Concurrent) echo -n "$SUPER_QUICK_OPTIONS" ;;
95 Prelude.Rate) echo -n "$SUPER_QUICK_OPTIONS" ;;
101 Prelude.Rate) echo -n "$SUPER_QUICK_OPTIONS" ;;
96 Prelude.Adaptive) echo -n "$SUPER_QUICK_OPTIONS" ;;
102 Prelude.Adaptive) echo -n "$SUPER_QUICK_OPTIONS" ;;
97− fileio) echo -n "$SUPER_QUICK_OPTIONS" ;;
98 *) echo -n "" ;;
103 *) echo -n "" ;;
99 esac
104 esac
100}
105}
@@ -108,18 +113,20 @@ bench_quick_opts () {
108 echo -n "$SUPER_QUICK_OPTIONS" ;;
113 echo -n "$SUPER_QUICK_OPTIONS" ;;
109 Prelude.Parallel/o-n-space/monad-outer-product/*)
114 Prelude.Parallel/o-n-space/monad-outer-product/*)
110 echo -n "$SUPER_QUICK_OPTIONS" ;;
115 echo -n "$SUPER_QUICK_OPTIONS" ;;
111− Prelude.Parallel/o-n-heap/generation/*) echo -n "$QUICK_OPTIONS" ;;
116+ Prelude.Parallel/o-n-heap/generation/*) use_quicker_mode ;;
112− Prelude.Parallel/o-n-heap/mapping/*) echo -n "$QUICK_OPTIONS" ;;
117+ Prelude.Parallel/o-n-heap/mapping/*) use_quicker_mode ;;
113− Prelude.Parallel/o-n-heap/concat-foldable/*) echo -n "$QUICK_OPTIONS" ;;
118+ Prelude.Parallel/o-n-heap/concat-foldable/*) use_quicker_mode ;;
119+
120+ Prelude.Async/o-1-space/monad-outer-product/*) use_quicker_mode ;;
121+ Prelude.Async/o-n-space/monad-outer-product/*) use_quicker_mode ;;
114
122
115− Prelude.Async/o-1-space/monad-outer-product/*) echo -n "$QUICK_OPTIONS" ;;
123+ Prelude.Ahead/o-1-space/monad-outer-product/*) use_quicker_mode ;;
116− Prelude.Async/o-n-space/monad-outer-product/*) echo -n "$QUICK_OPTIONS" ;;
124+ Prelude.Ahead/o-n-space/monad-outer-product/*) use_quicker_mode ;;
117
125
118− Prelude.Ahead/o-1-space/monad-outer-product/*) echo -n "$QUICK_OPTIONS" ;;
126+ Prelude.WAsync/o-n-heap/monad-outer-product/*) use_quicker_mode ;;
119− Prelude.Ahead/o-n-space/monad-outer-product/*) echo -n "$QUICK_OPTIONS" ;;
127+ Prelude.WAsync/o-n-space/monad-outer-product/*) use_quicker_mode ;;
120
128
121− Prelude.WAsync/o-n-heap/monad-outer-product/*) echo -n "$QUICK_OPTIONS" ;;
129+ FileSystem.Handle/*) use_quicker_mode ;;
122− Prelude.WAsync/o-n-space/monad-outer-product/*) echo -n "$QUICK_OPTIONS" ;;
123 *) echo -n "" ;;
130 *) echo -n "" ;;
124 esac
131 esac
125}
132}