aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2021-03-16 13:07:37 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2021-03-16 13:07:37 -0700
commitb6b40de7fc5c0906bc8d95addaac621fd8a8fb34 (patch)
treeac4cd45b4d8e13ca9a77fd26fc373d59e025dd74 /Makefile
parenta366e2b5744f0dee38fb3eb69b0b0c4bd8070fd1 (diff)
downloadpandoc-b6b40de7fc5c0906bc8d95addaac621fd8a8fb34.tar.gz
Use BENCHARGS in 'make bench'.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 4 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 93811d3a6..274c6f9f2 100644
--- a/Makefile
+++ b/Makefile
@@ -15,7 +15,9 @@ endif
GHCOPTS=-fdiagnostics-color=always
WEBSITE=../../web/pandoc.org
REVISION?=1
-BENCHARGS?=--timeout=6 +RTS -T -RTS $(if $(PATTERN),--pattern "$(PATTERN)",)
+BENCHARGS?=--small --time-limit=2 --match=pattern $(PATTERN)
+# For tasty-bench:
+# BENCHARGS?=--csv bench_$(TIMESTAMP).csv --timeout=6 +RTS -T -RTS $(if $(PATTERN),--pattern "$(PATTERN)",)
quick:
stack install --ghc-options='$(GHCOPTS)' --install-ghc --flag 'pandoc:embed_data_files' --fast --test --ghc-options='-j4 +RTS -A256m -RTS' --test-arguments='-j4 --hide-successes $(TESTARGS)'
@@ -53,16 +55,11 @@ ghcid-test:
bench:
stack bench \
--ghc-options '-Rghc-timing $(GHCOPTS)' \
- --benchmark-arguments='--small --time-limit=2 \
- --match=pattern $(PATTERN)' 2>&1 | \
+ --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"
-
-# With tasty-bench, we used
-# --benchmark-arguments='$(BENCHARGS) $(BASELINE) --csv bench_$(TIMESTAMP).csv' --ghc-options '-Rghc-timing $(GHCOPTS)'
-
reformat:
for f in $(SOURCEFILES); do echo $$f; stylish-haskell -i $$f ; done