diff options
author | Sergey Poznyakoff <gray@gnu.org> | 2020-03-14 12:02:33 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org> | 2020-03-15 09:27:25 +0200 |
commit | 87279b57516dfd891ef03858dac1d644df758b4c (patch) | |
tree | cd45ffc5d34e94749a77987975555996c22188c9 /src/benchmark.mk.in | |
download | cache-benchmarks-87279b57516dfd891ef03858dac1d644df758b4c.tar.gz cache-benchmarks-87279b57516dfd891ef03858dac1d644df758b4c.tar.bz2 |
Initial commit
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 + |