mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-30 16:22:07 +08:00
mdbx: simple ioarena-based benchmark.
https://github.com/pmwkaa/ioarena Change-Id: I8c0a5a2410e243d49541723afe519dbba12ac68d
This commit is contained in:
parent
e47f52a2f3
commit
7d63855793
27
Makefile
27
Makefile
@ -22,6 +22,8 @@ XCFLAGS ?=
|
|||||||
CFLAGS ?= -O2 -ggdb3 -Wall -Werror -DNDEBUG=1
|
CFLAGS ?= -O2 -ggdb3 -Wall -Werror -DNDEBUG=1
|
||||||
CFLAGS += -pthread $(XCFLAGS)
|
CFLAGS += -pthread $(XCFLAGS)
|
||||||
|
|
||||||
|
IOARENA ?= ../ioarena.git/@BUILD/src/ioarena
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
IHDRS := lmdb.h mdbx.h
|
IHDRS := lmdb.h mdbx.h
|
||||||
@ -153,3 +155,28 @@ coverage: @gcov-mdb.o
|
|||||||
gcc -o @gcov-$$x $$x.o $^ -pthread $(COV_FLAGS); \
|
gcc -o @gcov-$$x $$x.o $^ -pthread $(COV_FLAGS); \
|
||||||
rm -rf testdb; mkdir testdb; ./@gcov-$$x; done
|
rm -rf testdb; mkdir testdb; ./@gcov-$$x; done
|
||||||
gcov @gcov-mdb
|
gcov @gcov-mdb
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
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