aboutsummaryrefslogtreecommitdiff
path: root/src/benchmark.mk.in
blob: 43c605c1fbe43f09ef5c163b488024cc38bc398e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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 -n $(NUMSAMPLES) $(RUNTESTOPT) \
			--final $${MAXCACHE:-$$(($$($(GDBMTOOL) a.gdbm dir |\
                                    sed -n -e '2{' \
                                           -e 's/.*Buckets = //' \
                                           -e 's/\.$$//' \
                                           -e 'p}') + 100))} \
			--log-file=$*.log \
		$(abs_top_builddir)/src/$*/fetchkeys $(FETCHKEYSOPT)
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) -DNUMSAMPLES=$(NUMSAMPLES) \
		$(abs_top_srcdir)/src/gnuplot.m4 > benchmark.gnuplot
plot: test benchmark.gnuplot
	gnuplot -p benchmark.gnuplot

Return to:

Send suggestions and report system problems to the System administrator.