diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b1b15bacd..12f7f21a6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1341,8 +1341,8 @@ Here are some useful optional tools: Eg: - stack install ghcid shelltestrunner quickbench hasktags - brew install entr + stack install ghcid shelltestrunner hasktags + git clone https://github.com/simonmichael/quickbench; cd quickbench; stack install # must run in source dir ### Get the code diff --git a/Makefile b/Makefile index 1e6fd91ee..a57fe85c7 100644 --- a/Makefile +++ b/Makefile @@ -648,7 +648,7 @@ bench: quickbench quickbench: samplejournals bench.sh $(call def-help,quickbench, benchmark commands in bench.sh with quickbench and $(BENCHEXES)) @echo; echo "run quick performance benchmarks in bench.sh (approximate, can be skewed):" - @which -s quickbench && quickbench -w $(BENCHEXES) || echo "quickbench not installed, skipping" + @which -s quickbench && quickbench -w $(BENCHEXES) || echo "quickbench not installed (see bench.sh), skipping" # bench: samplejournals tests/bench.tests tools/simplebench \ # $(call def-help,bench,\ diff --git a/bench.sh b/bench.sh index e2895fb07..d6296cb46 100755 --- a/bench.sh +++ b/bench.sh @@ -4,15 +4,23 @@ # can be affected by system activity. Usually this isn't a problem. The last # (criterion) is more robust. # -# Generate the test journals: make samplejournals -# Get quickbench: stack install quickbench +# Generate the test journals: +# make samplejournals +# +# Get quickbench: +# git clone https://github.com/simonmichael/quickbench +# cd quickbench +# stack install # must be run in source dir +# # Measure performance: -# time ./bench.sh # show if these work, what they do, total time +# time ./bench.sh # show if these work, what they do, total time (GNU time also shows max memory) # quickbench [OPTS] # time each command, one or more times # make bench # time each command with several hledger versions (BENCHEXES in Makefile) # stack bench hledger # time a different set of benchmarks (bench/bench.hs) # stack bench hledger --ba --criterion # time more carefully, using criterion +# commands to benchmark: + # hledger -f examples/100x100x10.journal print # hledger -f examples/1000x1000x10.journal print hledger -f examples/10000x1000x10.journal print