提交 2fa5d41b 编写于 作者: H Haobo Xu

[RocksDB] make SetPerfLevel affect only the current thread

Summary: as title, make it easy to turn on/off profiling at per thread level.

Test Plan: make check

Reviewers: sdong, ljin

Reviewed By: ljin

CC: leveldb

Differential Revision: https://reviews.facebook.net/D17469
上级 f76e4027
......@@ -10,7 +10,7 @@
namespace rocksdb {
// by default, enable counts only
PerfLevel perf_level = kEnableCount;
__thread PerfLevel perf_level = kEnableCount;
void SetPerfLevel(PerfLevel level) { perf_level = level; }
......
......@@ -9,7 +9,7 @@
namespace rocksdb {
extern enum PerfLevel perf_level;
extern __thread PerfLevel perf_level;
inline void StartPerfTimer(StopWatchNano* timer) {
if (perf_level >= PerfLevel::kEnableTime) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册