diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 18 |
1 files changed, 7 insertions, 11 deletions
@@ -7,21 +7,19 @@ DOCKERIMAGE=registry.gitlab.b-data.ch/ghc/ghc4pandoc:8.10.4 COMMIT=$(shell git rev-parse --short HEAD) TIMESTAMP=$(shell date "+%Y%m%d_%H%M") LATESTBENCH=$(word 1,$(shell ls -t bench_*.csv 2>/dev/null)) -ifeq ($(LATESTBENCH),) -BASELINE= +BASELINE?=$(LATESTBENCH) +ifeq ($(BASELINE),) +BASELINECMD= else -BASELINE=--baseline $(LATESTBENCH) +BASELINECMD=--baseline $(BASELINE) endif GHCOPTS=-fdiagnostics-color=always -j4 +RTS -A256m -RTS WEBSITE=../../web/pandoc.org REVISION?=1 -# Note: for benchmarks we use +RTS -A256m -I0 -RTS ; otherwise the benchmarks -# are measuring garbage collecting, and this can vary depending on which -# other benchmarks are run. # For gauge: -BENCHARGS?=--small --ci=0.90 --match=pattern $(PATTERN) +RTS -T -A256m -I0 -RTS +# BENCHARGS?=--small --ci=0.90 --match=pattern $(PATTERN) # For tasty-bench: -# BENCHARGS?=--csv bench_$(TIMESTAMP).csv --timeout=6 +RTS -T -A256m -I0 -RTS $(if $(PATTERN),--pattern "$(PATTERN)",) +BENCHARGS?=--csv bench_$(TIMESTAMP).csv $(BASELINECMD) --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='$(GHCOPTS)' --test-arguments='-j4 --hide-successes $(TESTARGS)' @@ -58,11 +56,9 @@ ghcid-test: bench: stack bench \ - --ghc-options '-Rghc-timing $(GHCOPTS)' \ + --ghc-options '$(GHCOPTS)' \ --benchmark-arguments='$(BENCHARGS)' 2>&1 | \ tee "bench_latest.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 |