From 56737508002f1759da8d4d9944a8e98e58dce917 Mon Sep 17 00:00:00 2001 From: Siddhesh Poyarekar Date: Sat, 29 Mar 2014 09:40:19 +0530 Subject: Detailed benchmark outputs for functions This patch adds an option to get detailed benchmark output for functions. Invoking the benchmark with 'make DETAILED=1 bench' causes each benchmark program to store a mean execution time for each input it works on. This is useful to give a more comprehensive picture of performance of functions compared to just the single mean figure. --- benchtests/Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'benchtests/Makefile') diff --git a/benchtests/Makefile b/benchtests/Makefile index be1170851d..f5488c1339 100644 --- a/benchtests/Makefile +++ b/benchtests/Makefile @@ -86,6 +86,12 @@ ifdef USE_CLOCK_GETTIME CPPFLAGS-nonlib += -DUSE_CLOCK_GETTIME endif +DETAILED_OPT := + +ifdef DETAILED +DETAILED_OPT := -d +endif + # This makes sure CPPFLAGS-nonlib and CFLAGS-nonlib are passed # for all these modules. cpp-srcs-left := $(binaries-benchset:=.c) $(binaries-bench:=.c) @@ -126,7 +132,7 @@ bench-func: $(binaries-bench) echo ","; \ fi; \ echo "Running $${run}" >&2; \ - $(run-bench); \ + $(run-bench) $(DETAILED_OPT); \ done; \ echo " }"; \ echo "}"; } > $(objpfx)bench.out-tmp; \ -- cgit 1.4.1