pub fn start_profiling(self: &Arc<Self>) -> Option<ProfileGuard> {
        if self.is_profiling.get_or_default().replace(true) {
            // The profiling was already active on the current thread.
            return None;
        }

        perf::set_perf_stats(perf::PerfStatsLevel::EnableCount);
        let mut context = rocksdb::PerfContext::default();
        context.reset();
        Some(ProfileGuard {
            operation: self.clone(),
            context,
        })
    }
Starts profiling RocksDB I/O operations until the returned guard is dropped.

Returns `None` if operations are already being profiled for this operation on the current thread.
Not checking this would lead to logical errors, like the same operations being profiled multiple times.
core/lib/storage/src/db.rs