From d262750c1aefb8ac33f353329131a7228a6d8a63 Mon Sep 17 00:00:00 2001 From: Johan Tibell Date: Mon, 3 Oct 2011 16:39:03 -0700 Subject: [PATCH] Backport: Make it easy to produce a CSV report with benchmark results --- benchmarks/Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/benchmarks/Makefile b/benchmarks/Makefile index f9a8956b..d6e40c9b 100644 --- a/benchmarks/Makefile +++ b/benchmarks/Makefile @@ -18,6 +18,7 @@ ghc-flags := -Wall -O2 -hide-all-packages \ -package deepseq -package hashable -package random -package bytestring \ $(ghc-prof-flags) -rtsopts ghc-flags += $(extra-ghc-flags) +criterion-flags := %.o: %.hs $(ghc) $(ghc-flags) -c -o $@ $< @@ -31,6 +32,10 @@ bench: $(lib) Benchmarks.o Util/Int.o Util/ByteString.o Util/String.o ranlib $(lib) $(ghc) $(ghc-flags) -threaded -o $@ $(filter %.o,$^) $(lib) +.PHONY: bench-all +bench-all: bench + ./bench -l | grep -v "Benchmarks:\|IntMap\|Map" | tr '\n' ' ' | xargs -d ' ' ./bench $(criterion-flags) +RTS -H -RTS + .PHONY: clean clean: -find . \( -name '*.o' -o -name '*.hi' \) -exec rm {} \;