- Commit
- 0655c79138d3115f12b08fb4d38d164c3b8482eb
- Parent
- 01954cef95435ec78d12e2e62defe25d5032a087
- Author
- John MacFarlane <jgm@berkeley.edu>
- Date
More 'make bench' improvements.
My personal build of CMark ✏️
More 'make bench' improvements.
1 file changed, 4 insertions, 5 deletions
Status | File Name | N° Changes | Insertions | Deletions |
Modified | Makefile | 9 | 4 | 5 |
diff --git 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