Skip to content

Commit

Permalink
Turned off performance measurement by default
Browse files Browse the repository at this point in the history
  • Loading branch information
James Pack committed Oct 29, 2019
1 parent 3e7faa1 commit 41129d5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion monitoring/perf_context_imp.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,13 @@ extern thread_local PerfContext perf_context;
#if defined(NPERF_CONTEXT)

#define PERF_TIMER_GUARD(metric)
#define PERF_CONDITIONAL_TIMER_FOR_MUTEX_GUARD(metric, condition)
#define PERF_CONDITIONAL_TIMER_FOR_MUTEX_GUARD(metric, condition, stats, \
ticker_type)
#define PERF_TIMER_MEASURE(metric)
#define PERF_TIMER_STOP(metric)
#define PERF_TIMER_START(metric)
#define PERF_COUNTER_ADD(metric, value)
#define PERF_COUNTER_BY_LEVEL_ADD(metric, value, level)

#else

Expand Down
3 changes: 3 additions & 0 deletions port/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,19 @@ PLATFORM_DEFINES = select({
"ROCKSDB_RANGESYNC_PRESENT",
"ROCKSDB_SCHED_GETCPU_PRESENT",
"rocksdb_shared_EXPORTS",
"NPERF_CONTEXT",
],
"//:osx": [
"OS_MACOSX",
"ROCKSDB_PLATFORM_POSIX",
"HAVE_SSE42",
"ROCKSDB_LIB_IO_POSIX",
"rocksdb_shared_EXPORTS",
"NPERF_CONTEXT",
],
"//:windows": [
"OS_WIN",
"NPERF_CONTEXT",
],
"//conditions:default": [],
})
Expand Down

0 comments on commit 41129d5

Please sign in to comment.