aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-11-17 17:57:42 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2014-11-17 17:57:42 -0800
commit0655c79138d3115f12b08fb4d38d164c3b8482eb (patch)
tree073fcc4e2d4a4aa9d9477c8c2a74ae60d1fb666e /Makefile
parent01954cef95435ec78d12e2e62defe25d5032a087 (diff)
More 'make bench' improvements.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 4 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index ad08e28..617598c 100644
--- a/Makefile
+++ b/Makefile
@@ -12,6 +12,7 @@ ZIPARCHIVE?=cmark-$(SPECVERSION).zip
FUZZCHARS?=2000000 # for fuzztest
BENCHDIR=bench
BENCHFILE=$(BENCHDIR)/benchinput.md
+NUMRUNS?=10
PROG?=$(BUILDDIR)/src/cmark
BENCHINP?=README.md
JSMODULES=$(wildcard js/lib/*.js)
@@ -117,7 +118,7 @@ fuzztest:
# for benchmarking
$(BENCHFILE): progit/progit.md
- -rm $@; for x in `seq 1 40` ; do cat $< >> $@; done
+ -rm $@; for x in `seq 1 20` ; do cat $< >> $@; done
progit:
git clone https://github.com/progit/progit.git
@@ -127,12 +128,10 @@ progit/progit.md: progit
bench: $(BENCHFILE)
{ sudo renice 99 $$$$; \
- for x in `seq 1 10` ; do \
+ for x in `seq 1 $(NUMRUNS)` ; do \
/usr/bin/env time -p ${PROG} $< >/dev/null ; \
done \
- } 2>&1 | grep 'real' |\
- awk '{print $$2}' | \
- python3 'bench/stats.py'
+ } 2>&1 | grep 'real' | awk '{print $$2}' | python3 'bench/stats.py'
operf: $(PROG)
operf $(PROG) <$(BENCHINP) >/dev/null