make bench: compare against a baseline, use datestamps for bench results.
This commit is contained in:
parent
d68bbae552
commit
b745bf3938
1 changed files with 8 additions and 1 deletions
9
Makefile
9
Makefile
|
@ -3,6 +3,13 @@ pandoc=$(shell find dist -name pandoc -type f -exec ls -t {} \; | head -1)
|
||||||
SOURCEFILES?=$(shell git ls-tree -r master --name-only | grep "\.hs$$")
|
SOURCEFILES?=$(shell git ls-tree -r master --name-only | grep "\.hs$$")
|
||||||
BRANCH?=master
|
BRANCH?=master
|
||||||
COMMIT=$(shell git rev-parse --short HEAD)
|
COMMIT=$(shell git rev-parse --short HEAD)
|
||||||
|
TIMESTAMP=$(shell date "+%Y%m%d_%H%M")
|
||||||
|
LATESTBENCH=$(word 1,$(shell ls -t bench_*.csv))
|
||||||
|
ifeq ($(LATESTBENCH),)
|
||||||
|
BASELINE=
|
||||||
|
else
|
||||||
|
BASELINE=--baseline $(LATESTBENCH)
|
||||||
|
endif
|
||||||
GHCOPTS=-fdiagnostics-color=always
|
GHCOPTS=-fdiagnostics-color=always
|
||||||
WEBSITE=../../web/pandoc.org
|
WEBSITE=../../web/pandoc.org
|
||||||
REVISION?=1
|
REVISION?=1
|
||||||
|
@ -39,7 +46,7 @@ ghcid:
|
||||||
ghcid -c "stack repl --flag 'pandoc:embed_data_files'"
|
ghcid -c "stack repl --flag 'pandoc:embed_data_files'"
|
||||||
|
|
||||||
bench:
|
bench:
|
||||||
stack bench --benchmark-arguments='$(BENCHARGS) --csv bench-$(COMMIT).csv' --ghc-options '$(GHCOPTS)'
|
stack bench --benchmark-arguments='$(BENCHARGS) $(BASELINE) --csv bench_$(TIMESTAMP).csv' --ghc-options '$(GHCOPTS)'
|
||||||
|
|
||||||
weigh:
|
weigh:
|
||||||
stack build --ghc-options '$(GHCOPTS)' pandoc:weigh-pandoc && stack exec weigh-pandoc
|
stack build --ghc-options '$(GHCOPTS)' pandoc:weigh-pandoc && stack exec weigh-pandoc
|
||||||
|
|
Loading…
Reference in a new issue