diff options
author | Sree Kuchibhotla <sreecha@users.noreply.github.com> | 2017-04-06 22:22:02 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-06 22:22:02 -0700 |
commit | 93aa1e79956695421dc2c29df30fb26ad7f53cbf (patch) | |
tree | 11d0a8b287a705d3339491ea4745900e4a597433 /src/core/lib | |
parent | 71f1b8ebf708e8d83b6b007aba558612660ef35c (diff) | |
parent | 631e78c34975f7d1cb030cd8d1b5593ed86a2e89 (diff) |
Merge pull request #10467 from sreecha/bm_cq_multi_threads
Microbenchmark for measuring impact of multiple threads calling cq_next
Diffstat (limited to 'src/core/lib')
-rw-r--r-- | src/core/lib/iomgr/ev_posix.c | 6 | ||||
-rw-r--r-- | src/core/lib/iomgr/ev_posix.h | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/core/lib/iomgr/ev_posix.c b/src/core/lib/iomgr/ev_posix.c index b5be5504b9..13409a4de8 100644 --- a/src/core/lib/iomgr/ev_posix.c +++ b/src/core/lib/iomgr/ev_posix.c @@ -111,6 +111,12 @@ static void try_engine(const char *engine) { } } +/* This should be used for testing purposes ONLY */ +void grpc_set_event_engine_test_only( + const grpc_event_engine_vtable *ev_engine) { + g_event_engine = ev_engine; +} + /* Call this only after calling grpc_event_engine_init() */ const char *grpc_get_poll_strategy_name() { return g_poll_strategy_name; } diff --git a/src/core/lib/iomgr/ev_posix.h b/src/core/lib/iomgr/ev_posix.h index 1a9e5c115a..becc4d359e 100644 --- a/src/core/lib/iomgr/ev_posix.h +++ b/src/core/lib/iomgr/ev_posix.h @@ -183,4 +183,7 @@ void grpc_pollset_set_del_fd(grpc_exec_ctx *exec_ctx, typedef int (*grpc_poll_function_type)(struct pollfd *, nfds_t, int); extern grpc_poll_function_type grpc_poll_function; +/* This should be used for testing purposes ONLY */ +void grpc_set_event_engine_test_only(const grpc_event_engine_vtable *); + #endif /* GRPC_CORE_LIB_IOMGR_EV_POSIX_H */ |