diff options
Diffstat (limited to 'src/benchmark.mk.in')
-rw-r--r-- | src/benchmark.mk.in | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/src/benchmark.mk.in b/src/benchmark.mk.in new file mode 100644 index 0000000..c576cd6 --- /dev/null +++ b/src/benchmark.mk.in @@ -0,0 +1,50 @@ +AM_DEFAULT_VERBOSITY=0 +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = + +abs_top_srcdir = @abs_top_srcdir@ +abs_top_builddir = @abs_top_builddir@ + +MASTERDIR=$(abs_top_builddir)/gdbm/master +GDBMTOOL=$(MASTERDIR)/src/gdbmtool +TESTDIR=$(MASTERDIR)/tests + +all: test +test: master.log newcache.log +%.log: keys.txt a.gdbm + $(AM_V_GEN)MAXCACHE=$(MAXCACHE); \ + $(abs_top_srcdir)/src/runtest -d \ + --final $${MAXCACHE:-$$(($$($(GDBMTOOL) a.gdbm dir |\ + sed -n -e '2{' \ + -e 's/.*Buckets = //' \ + -e 's/\.$$//' \ + -e 'p}') * 2))} \ + --log-file=$*.log \ + $(abs_top_builddir)/src/$*/fetchkeys +clean: + rm -f master.log newcache.log +allclean: clean + rm -f keys.txt a.gdbm +keys.txt: + @$(MAKE) -C $(TESTDIR) num2word + $(AM_V_GEN)$(TESTDIR)/num2word 1:$(NRECS) | \ + cut -f1 | shuf | head -n $(NKEYS) > keys.txt +a.gdbm: + @$(MAKE) -C $(TESTDIR) num2word gtload + $(AM_V_GEN)$(TESTDIR)/num2word 1:$(NRECS) | $(TESTDIR)/gtload -clear a.gdbm +benchmark.gnuplot: $(abs_top_srcdir)/src/gnuplot.m4 + m4 -DNRECS=$(NRECS) -DNKEYS=$(NKEYS) \ + $(abs_top_srcdir)/src/gnuplot.m4 > benchmark.gnuplot +plot: test benchmark.gnuplot + gnuplot -p benchmark.gnuplot + |