From b6b40de7fc5c0906bc8d95addaac621fd8a8fb34 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Tue, 16 Mar 2021 13:07:37 -0700 Subject: Use BENCHARGS in 'make bench'. --- Makefile | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'Makefile') 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 -- cgit v1.2.3