Table of Contents

Enum PerfLevel

Namespace
RocksDbNet
Assembly
RocksDb.Net.dll

How much detail RocksDb collects into the per-thread PerfContext, mapped from rocksdb::PerfLevel in perf_level.h.

public enum PerfLevel

Fields

Disable = 1

Collect nothing.

EnableCount = 2

Collect counters only, such as key comparisons, blocks read and bytes read. This is RocksDb's default.

EnableTime = 6

Measure everything, including time spent on mutexes.

EnableTimeAndCpuTimeExceptForMutex = 5

Also measure CPU time of operations, excluding mutex waits.

EnableTimeExceptForMutex = 4

Also measure end-to-end time of operations, excluding mutex waits.

EnableWait = 3

Also measure time spent waiting for RocksDb itself, as opposed to waiting on mutexes or I/O.

Remarks

Each level includes the ones before it, and costs more. Counting is on by default; the timing levels add real overhead and should be enabled around the operation being investigated rather than left on.

These values come from RocksDb's C++ header, not from the constants in its C header. Those are stale: the C header's value for "time except for mutex" is 3, which the C++ enum now uses for EnableWait, and the setter casts the value without checking it. Following the C header would silently select the wrong level.