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).
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!
27 // set the perf stats level for current thread
28 void SetPerfLevel(PerfLevel level
);
30 // get current perf stats level for current thread
31 PerfLevel
GetPerfLevel();
33 } // namespace rocksdb