pub(crate) fn maybe_enable_rocksdb_perf(
    sample_interval: usize,
    perf_status: &PerfSamplingStatus
) -> Option<Instant>
Expand description

The function enables RocksDB PerfContext once for every sample_interval.

PerfContext is a thread-local struct defined in RocksDB for collecting per-thread read / write performance metrics.

When this function enables PerfContext, the function will return true, and the PerfContext of the ubsequent RocksDB operation will be collected.