diff options
author | John MacFarlane <jgm@berkeley.edu> | 2014-11-15 21:17:16 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2014-11-15 21:18:48 -0800 |
commit | 9989d80d3b1e9d30c92034164108de4590b7ddb9 (patch) | |
tree | 00c75a18aa42dc2c4e315f0b1b38450b443c5f64 /Makefile | |
parent | 69d4e8b2a22c2d8ed4592e1bf3936a4a4d25f3a8 (diff) |
Added a 'bench' target which does some basic stats on multiple runs.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -13,7 +13,7 @@ PROG?=$(BUILDDIR)/src/cmark BENCHINP?=README.md JSMODULES=$(wildcard js/lib/*.js) -.PHONY: all spec leakcheck clean fuzztest dingus upload jshint test testjs benchjs update-site upload-site check npm debug mingw tarball +.PHONY: all spec leakcheck clean fuzztest dingus upload jshint test testjs benchjs update-site upload-site check npm debug mingw tarball bench all: $(BUILDDIR) @make -C $(BUILDDIR) @@ -90,6 +90,15 @@ fuzztest: /usr/bin/env time -p $(PROG) >/dev/null && rm fuzz-$$i.txt ; \ done } 2>&1 | grep 'user\|abnormally' +bench: + make -C ${BUILDDIR} TIMER=1 + { for x in `seq 1 100` ; do \ + /usr/bin/env time -p ${PROG} progit.md >/dev/null ; \ + done \ + } 2>&1 | grep 'processing lines' | \ + awk '{print $$3;}' | \ + Rscript -e 'summary (as.numeric (readLines ("stdin")))' + operf: $(PROG) operf $(PROG) <$(BENCHINP) >/dev/null |