mirror of
https://github.com/isar/libmdbx.git
synced 2024-12-29 09:18:50 +08:00
mdbx: refine 'bench' make target.
Change-Id: Ib0594f45ee4b4eedfd18b60483d104913321585e
This commit is contained in:
parent
ef35aae2fe
commit
9871e24670
29
Makefile
29
Makefile
@ -160,23 +160,28 @@ ifneq ($(wildcard $(IOARENA)),)
|
||||
|
||||
.PHONY: bench clean-bench re-bench
|
||||
|
||||
bench: bench-lmdb.txt bench-mdbx.txt
|
||||
|
||||
clean-bench:
|
||||
rm -rf bench-*.txt _ioarena
|
||||
|
||||
re-bench: clean-bench bench
|
||||
|
||||
NN := 1000000
|
||||
define bench-rule
|
||||
bench-$(1).txt: $(3) $(IOARENA) Makefile
|
||||
$(IOARENA) -D $(1) -B crud -m nosync -n $(2) | tee $$@ | grep throughput \
|
||||
&& $(IOARENA) -D $(1) -B get,iterate -m sync -r 4 -n $(2) | tee -a $$@ | grep throughput \
|
||||
|| rm -f $$@
|
||||
|
||||
endef
|
||||
|
||||
$(eval $(call bench-rule,mdbx,$(NN),libmdbx.so))
|
||||
|
||||
$(eval $(call bench-rule,lmdb,$(NN)))
|
||||
|
||||
$(eval $(call bench-rule,dummy,$(NN)))
|
||||
|
||||
$(eval $(call bench-rule,debug,10))
|
||||
|
||||
bench: bench-lmdb.txt bench-mdbx.txt
|
||||
|
||||
bench-mdbx.txt: libmdbx.so $(IOARENA)
|
||||
$(IOARENA) -D mdbx -B crud -m nosync -n 10000000 | tee $@ \
|
||||
&& $(IOARENA) -D mdbx -B get,iterate -m sync -r 4 -n 10000000 | tee -a $@ \
|
||||
|| rm -f $@
|
||||
|
||||
bench-lmdb.txt: $(IOARENA)
|
||||
$(IOARENA) -D lmdb -B crud -m nosync -n 10000000 | tee $@ \
|
||||
&& $(IOARENA) -D lmdb -B get,iterate -m sync -r 4 -n 10000000 | tee -a $@ \
|
||||
|| rm -f $@
|
||||
|
||||
endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user