-
Notifications
You must be signed in to change notification settings - Fork 68
/
perf_level.go
32 lines (28 loc) · 1.02 KB
/
perf_level.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package grocksdb
// #include "rocksdb/c.h"
import "C"
// PerfLevel indicates how much perf stats to collect. Affects perf_context and iostats_context.
type PerfLevel int
const (
// KUninitialized indicates unknown setting
KUninitialized PerfLevel = 0
// KDisable disables perf stats
KDisable PerfLevel = 1
// KEnableCount enables only count stats
KEnableCount PerfLevel = 2
// KEnableTimeExceptForMutex other than count stats,
// also enable time stats except for mutexes
KEnableTimeExceptForMutex PerfLevel = 3
// KEnableTimeAndCPUTimeExceptForMutex other than time,
// also measure CPU time counters. Still don't measure
// time (neither wall time nor CPU time) for mutexes.
KEnableTimeAndCPUTimeExceptForMutex PerfLevel = 4
// KEnableTime enables count and time stats
KEnableTime PerfLevel = 5
// KOutOfBounds N.B. Must always be the last value!
KOutOfBounds PerfLevel = 6
)
// SetPerfLevel sets the perf stats level for current thread.
func SetPerfLevel(level PerfLevel) {
C.rocksdb_set_perf_level(C.int(level))
}