build and use an easy ./bench binary
This commit is contained in:
parent
ff6d3f40c1
commit
e5035ed42a
11
Makefile
11
Makefile
@ -1,3 +1,4 @@
|
|||||||
|
# executables for "make bench". prepend ./ to these if not in $PATH
|
||||||
BENCHEXES=hledger ledger
|
BENCHEXES=hledger ledger
|
||||||
|
|
||||||
BUILD=ghc --make hledger.hs -o hledger -O
|
BUILD=ghc --make hledger.hs -o hledger -O
|
||||||
@ -34,11 +35,13 @@ profile:
|
|||||||
cp simple.prof profs/$(TIME).prof
|
cp simple.prof profs/$(TIME).prof
|
||||||
cat simple.prof
|
cat simple.prof
|
||||||
|
|
||||||
BENCHITERATIONS=2
|
|
||||||
# run performance benchmarks and save results in profs
|
# run performance benchmarks and save results in profs
|
||||||
# prepend ./ to executables if not in $PATH
|
bench: buildbench
|
||||||
bench:
|
./bench $(BENCHEXES) | tee profs/`date +%Y%m%d%H%M%S`.bench
|
||||||
tools/bench.hs bench.tests $(BENCHITERATIONS) $(BENCHEXES) | tee profs/`date +%Y%m%d%H%M%S`.bench
|
|
||||||
|
buildbench:
|
||||||
|
ghc --make tools/bench.hs
|
||||||
|
rm -f bench; ln -s tools/bench
|
||||||
|
|
||||||
VERSION=`grep 'versionno =' Options.hs | perl -pe 's/.*"(.*?)"/\1/'`
|
VERSION=`grep 'versionno =' Options.hs | perl -pe 's/.*"(.*?)"/\1/'`
|
||||||
release:
|
release:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user