/src/rocksdb/monitoring/perf_level.cc
Line | Count | Source |
1 | | // Copyright (c) 2011-present, Facebook, Inc. All rights reserved. |
2 | | // This source code is licensed under both the GPLv2 (found in the |
3 | | // COPYING file in the root directory) and Apache 2.0 License |
4 | | // (found in the LICENSE.Apache file in the root directory). |
5 | | // |
6 | | |
7 | | #include <cassert> |
8 | | |
9 | | #include "monitoring/perf_level_imp.h" |
10 | | |
11 | | namespace ROCKSDB_NAMESPACE { |
12 | | |
13 | | thread_local PerfLevel perf_level = kEnableCount; |
14 | | |
15 | 47.3M | void SetPerfLevel(PerfLevel level) { |
16 | 47.3M | assert(level > kUninitialized); |
17 | 47.3M | assert(level < kOutOfBounds); |
18 | 47.3M | perf_level = level; |
19 | 47.3M | } |
20 | | |
21 | 24.9M | PerfLevel GetPerfLevel() { return perf_level; } |
22 | | |
23 | | } // namespace ROCKSDB_NAMESPACE |