]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | // Copyright (c) 2011-present, Facebook, Inc. All rights reserved. |
2 | // This source code is licensed under the BSD-style license found in the | |
3 | // LICENSE file in the root directory of this source tree. An additional grant | |
4 | // of patent rights can be found in the PATENTS file in the same directory. | |
5 | // | |
6 | ||
7 | #include <assert.h> | |
8 | #include <sstream> | |
9 | #include "monitoring/perf_level_imp.h" | |
10 | #include "port/port.h" | |
11 | ||
12 | namespace rocksdb { | |
13 | ||
14 | #if defined(IOS_CROSS_COMPILE) | |
15 | PerfLevel perf_level = kEnableCount; | |
16 | #else | |
17 | __thread PerfLevel perf_level = kEnableCount; | |
18 | #endif | |
19 | ||
20 | void SetPerfLevel(PerfLevel level) { | |
21 | assert(level > kUninitialized); | |
22 | assert(level < kOutOfBounds); | |
23 | perf_level = level; | |
24 | } | |
25 | ||
26 | PerfLevel GetPerfLevel() { | |
27 | return perf_level; | |
28 | } | |
29 | ||
30 | } // namespace rocksdb |