aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2021-03-16 15:59:50 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2021-03-16 15:59:50 -0700
commit1ef35343288ae7cb1d074c6a25aa5e47fdc55da9 (patch)
treee9d3bf137848de4b64e2f1ae797e784f06e85287 /Makefile
parent94c917c13feed49c2d5ad278849456a488673347 (diff)
downloadpandoc-1ef35343288ae7cb1d074c6a25aa5e47fdc55da9.tar.gz
Increase heap space in runtime for benchmarks.
Otherwise we're essentially benchmarking garbage collecting, which can give very inconsistent results.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 5 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index ac1850c2d..60aaeb43f 100644
--- a/Makefile
+++ b/Makefile
@@ -15,9 +15,10 @@ endif
GHCOPTS=-fdiagnostics-color=always -j4 +RTS -A256m -RTS
WEBSITE=../../web/pandoc.org
REVISION?=1
-BENCHARGS?=--small --time-limit=2 --match=pattern $(PATTERN)
+# For gauge:
+BENCHARGS?=--small --ci=0.90 --match=pattern $(PATTERN) +RTS -T -A256m -I0 -RTS
# For tasty-bench:
-# BENCHARGS?=--csv bench_$(TIMESTAMP).csv --timeout=6 +RTS -T -RTS $(if $(PATTERN),--pattern "$(PATTERN)",)
+# BENCHARGS?=--csv bench_$(TIMESTAMP).csv --timeout=6 +RTS -T -A256m -I0 -RTS $(if $(PATTERN),--pattern "$(PATTERN)",)
quick:
stack install --ghc-options='$(GHCOPTS)' --install-ghc --flag 'pandoc:embed_data_files' --fast --test --ghc-options='$(GHCOPTS)' --test-arguments='-j4 --hide-successes $(TESTARGS)'
@@ -57,8 +58,8 @@ bench:
--ghc-options '-Rghc-timing $(GHCOPTS)' \
--benchmark-arguments='$(BENCHARGS)' 2>&1 | \
tee "bench_latest.txt"
- perl -pe 's/\x1b\[[0-9;]*[mGK]//g;s/\r//;' bench_latest.txt > \
- "bench_$(TIMESTAMP).txt"
+ perl -ne 'if (/\r/) { s/\x1b\[[0-9;]*[mGK]//g;s/^.*\r//;print; }' \
+ bench_latest.txt > "bench_$(TIMESTAMP).txt"
reformat:
for f in $(SOURCEFILES); do echo $$f; stylish-haskell -i $$f ; done