]> git.proxmox.com Git - ceph.git/blob - ceph/src/rocksdb/include/rocksdb/perf_level.h
218c6015f82f7bc50de2eb2f59e00b701fe8167e
[ceph.git] / ceph / src / rocksdb / include / rocksdb / perf_level.h
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 #pragma once
7
8 #include <stdint.h>
9 #include <string>
10
11 namespace rocksdb {
12
13 // How much perf stats to collect. Affects perf_context and iostats_context.
14 enum PerfLevel : unsigned char {
15 kUninitialized = 0, // unknown setting
16 kDisable = 1, // disable perf stats
17 kEnableCount = 2, // enable only count stats
18 kEnableTimeExceptForMutex = 3, // Other than count stats, also enable time
19 // stats except for mutexes
20 kEnableTime = 4, // enable count and time stats
21 kOutOfBounds = 5 // N.B. Must always be the last value!
22 };
23
24 // set the perf stats level for current thread
25 void SetPerfLevel(PerfLevel level);
26
27 // get current perf stats level for current thread
28 PerfLevel GetPerfLevel();
29
30 } // namespace rocksdb