[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
This commit is contained in:
Haobo Xu
2014-04-02 22:59:48 -07:00
parent f76e4027ca
commit 2fa5d41ba3
2 changed files with 2 additions and 2 deletions

View File

@@ -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; }