]> git.proxmox.com Git - ceph.git/blob - ceph/src/rocksdb/include/rocksdb/perf_level.h
import 14.2.4 nautilus point release
[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 // Other than time, also measure CPU time counters. Still don't measure
21 // time (neither wall time nor CPU time) for mutexes.
22 kEnableTimeAndCPUTimeExceptForMutex = 4,
23 kEnableTime = 5, // enable count and time stats
24 kOutOfBounds = 6 // N.B. Must always be the last value!
25 };
26
27 // set the perf stats level for current thread
28 void SetPerfLevel(PerfLevel level);
29
30 // get current perf stats level for current thread
31 PerfLevel GetPerfLevel();
32
33 } // namespace rocksdb