From 59408ad2eff5d8db3487e49f27cf2ee94b8f4e46 Mon Sep 17 00:00:00 2001 From: Jim Harris Date: Fri, 20 Jan 2017 15:21:18 -0700 Subject: [PATCH] test/event: rename event to event_perf While here, make it clear this is a benchmark that tests internal APIs. Signed-off-by: Jim Harris Change-Id: Ie5a57fdcee12b47568542721095c49d28ece5529 --- include/spdk/event.h | 3 --- include/spdk_internal/event.h | 2 ++ test/lib/event/Makefile | 2 +- test/lib/event/event.sh | 2 +- test/lib/event/event/.gitignore | 1 - test/lib/event/event_perf/.gitignore | 1 + test/lib/event/{event => event_perf}/Makefile | 4 ++-- test/lib/event/{event/event.c => event_perf/event_perf.c} | 3 ++- 8 files changed, 9 insertions(+), 9 deletions(-) delete mode 100644 test/lib/event/event/.gitignore create mode 100644 test/lib/event/event_perf/.gitignore rename test/lib/event/{event => event_perf}/Makefile (98%) rename test/lib/event/{event/event.c => event_perf/event_perf.c} (98%) diff --git a/include/spdk/event.h b/include/spdk/event.h index fe1939bb25..d598821472 100644 --- a/include/spdk/event.h +++ b/include/spdk/event.h @@ -206,9 +206,6 @@ struct spdk_event *spdk_event_allocate(uint32_t lcore, spdk_event_fn fn, */ void spdk_event_call(struct spdk_event *event); -/* TODO: This is only used by tests and should be made private */ -uint32_t spdk_event_queue_run_batch(uint32_t lcore); - /** * \brief Register a poller on the given lcore. */ diff --git a/include/spdk_internal/event.h b/include/spdk_internal/event.h index e7d45f9d1a..7e2c49e369 100644 --- a/include/spdk_internal/event.h +++ b/include/spdk_internal/event.h @@ -51,6 +51,8 @@ int spdk_reactors_fini(void); void spdk_reactors_start(void); void spdk_reactors_stop(void); +uint32_t spdk_event_queue_run_batch(uint32_t lcore); + struct spdk_subsystem { const char *name; int (*init)(void); diff --git a/test/lib/event/Makefile b/test/lib/event/Makefile index e615cc8705..7b7dd4b07f 100644 --- a/test/lib/event/Makefile +++ b/test/lib/event/Makefile @@ -34,7 +34,7 @@ SPDK_ROOT_DIR := $(abspath $(CURDIR)/../../..) include $(SPDK_ROOT_DIR)/mk/spdk.common.mk -DIRS-y = event reactor subsystem +DIRS-y = event_perf reactor subsystem .PHONY: all clean $(DIRS-y) diff --git a/test/lib/event/event.sh b/test/lib/event/event.sh index f850ed66d9..1140928983 100755 --- a/test/lib/event/event.sh +++ b/test/lib/event/event.sh @@ -5,7 +5,7 @@ rootdir=$testdir/../../.. source $rootdir/scripts/autotest_common.sh timing_enter event -$testdir/event/event -m 0xF -t 5 +$testdir/event_perf/event_perf -m 0xF -t 5 $testdir/reactor/reactor -t 1 $testdir/subsystem/subsystem_ut timing_exit event diff --git a/test/lib/event/event/.gitignore b/test/lib/event/event/.gitignore deleted file mode 100644 index c8d248f021..0000000000 --- a/test/lib/event/event/.gitignore +++ /dev/null @@ -1 +0,0 @@ -event diff --git a/test/lib/event/event_perf/.gitignore b/test/lib/event/event_perf/.gitignore new file mode 100644 index 0000000000..2bdb558da2 --- /dev/null +++ b/test/lib/event/event_perf/.gitignore @@ -0,0 +1 @@ +event_perf diff --git a/test/lib/event/event/Makefile b/test/lib/event/event_perf/Makefile similarity index 98% rename from test/lib/event/event/Makefile rename to test/lib/event/event_perf/Makefile index 16a01b5ee3..c9e5ca8128 100644 --- a/test/lib/event/event/Makefile +++ b/test/lib/event/event_perf/Makefile @@ -36,8 +36,8 @@ include $(SPDK_ROOT_DIR)/mk/spdk.app.mk include $(SPDK_ROOT_DIR)/mk/spdk.common.mk CFLAGS += $(ENV_CFLAGS) -APP = event -C_SRCS := event.c +APP = event_perf +C_SRCS := event_perf.c SPDK_LIB_LIST = event trace conf util log diff --git a/test/lib/event/event/event.c b/test/lib/event/event_perf/event_perf.c similarity index 98% rename from test/lib/event/event/event.c rename to test/lib/event/event_perf/event_perf.c index 475892b4ca..dcd1145399 100644 --- a/test/lib/event/event/event.c +++ b/test/lib/event/event_perf/event_perf.c @@ -44,6 +44,7 @@ #include "spdk/env.h" #include "spdk/event.h" +#include "spdk_internal/event.h" #include "spdk/log.h" static uint64_t g_tsc_rate; @@ -125,7 +126,7 @@ main(int argc, char **argv) int i; spdk_app_opts_init(&opts); - opts.name = "event"; + opts.name = "event_perf"; g_time_in_sec = 0;