[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

@@ -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) {