From f9b1bbe1e3736de79bf52513ae01caea45edae9f Mon Sep 17 00:00:00 2001 From: Leo Yuriev Date: Thu, 26 Oct 2017 17:15:56 +0300 Subject: [PATCH] mdbx-bench: minors for calling ioarena. --- Makefile | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index f39db1b2..0e9adf58 100644 --- a/Makefile +++ b/Makefile @@ -34,7 +34,10 @@ TESTLOG ?= $(shell [ -d /dev/shm ] && echo /dev/shm || echo /tmp)/mdbx-check.log LDFLAGS ?= -Wl,--gc-sections,-z,relro,-O,--no-as-needed,-lrt # LY: just for benchmarking -IOARENA ?= ../ioarena.git/@BUILD/src/ioarena +IOARENA ?= $(shell \ + (test -x ../ioarena/@RelWithDebInfo/src/ioarena && echo ../ioarena/@RelWithDebInfo/src/ioarena) || \ + (test -x ../../@RelWithDebInfo/src/ioarena && echo ../../@RelWithDebInfo/src/ioarena) || \ + (test -x ../../src/ioarena && echo ../../src/ioarena) || which ioarena) ######################################################################## @@ -116,14 +119,22 @@ re-bench: clean-bench bench NN := 25000000 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 \ + LD_LIBRARY_PATH="./:$$$${LD_LIBRARY_PATH}" \ + $(IOARENA) -D $(1) -B crud -m nosync -n $(2) \ + | tee $$@ | grep throughput && \ + LD_LIBRARY_PATH="./:$$$${LD_LIBRARY_PATH}" \ + $(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,sqlite3,$(NN))) + $(eval $(call bench-rule,dummy,$(NN))) $(eval $(call bench-rule,debug,10))