diff options
author | John MacFarlane <jgm@berkeley.edu> | 2015-12-19 17:20:40 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2015-12-19 17:20:40 -0800 |
commit | 79603efef8fd84fea1d87784ca7538958d0dabd3 (patch) | |
tree | 3918d29b5ca1b7b61082e687f6be81af0b3b5b63 /Makefile | |
parent | 00ae2c61a47e09bb7643f0a7153c2009b7537e09 (diff) |
Improved benchmark. Use longer test.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -14,7 +14,6 @@ ALLTESTS=alltests.md NUMRUNS?=10 CMARK=$(BUILDDIR)/src/cmark PROG?=$(CMARK) -BENCHINP?=README.md VERSION?=$(SPECVERSION) RELEASE?=CommonMark-$(VERSION) INSTALL_PREFIX?=/usr/local @@ -154,26 +153,28 @@ fuzztest: progit: git clone https://github.com/progit/progit.git -$(BENCHDIR)/benchinput.md: progit +$(BENCHFILE): progit echo "" > $@ for lang in ar az be ca cs de en eo es es-ni fa fi fr hi hu id it ja ko mk nl no-nb pl pt-br ro ru sr th tr uk vi zh zh-tw; do \ - cat progit/$$lang/*/*.markdown >> $@; \ + for i in `seq 1 10`; do \ + cat progit/$$lang/*/*.markdown >> $@; \ + done; \ done # for more accurate results, run with # sudo renice -10 $$; make bench bench: $(BENCHFILE) { for x in `seq 1 $(NUMRUNS)` ; do \ - /usr/bin/env time -p $(PROG) </dev/null >/dev/null ; \ - /usr/bin/env time -p $(PROG) $< >/dev/null ; \ - done \ + /usr/bin/env time -p $(PROG) </dev/null >/dev/null ; \ + /usr/bin/env time -p $(PROG) $< >/dev/null ; \ + done \ } 2>&1 | grep 'real' | awk '{print $$2}' | python3 'bench/stats.py' format: clang-format -style llvm -i src/*.c src/*.h operf: $(CMARK) - operf $< < $(BENCHINP) > /dev/null + operf $< < $(BENCHFILE) > /dev/null distclean: clean -rm -rf *.dSYM |