Skip to content

Commit

Permalink
;tools: update instructions for installing quickbench
Browse files Browse the repository at this point in the history
  • Loading branch information
simonmichael committed Jun 16, 2021
1 parent a4db52a commit 069e672
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -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,\
Expand Down
14 changes: 11 additions & 3 deletions bench.sh
Expand Up @@ -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
Expand Down

0 comments on commit 069e672

Please sign in to comment.