[][src]Struct rocks::perf_context::PerfContext

#[repr(C)]pub struct PerfContext {
    pub user_key_comparison_count: u64,
    pub block_cache_hit_count: u64,
    pub block_read_count: u64,
    pub block_read_byte: u64,
    pub block_read_time: u64,
    pub block_checksum_time: u64,
    pub block_decompress_time: u64,
    pub internal_key_skipped_count: u64,
    pub internal_delete_skipped_count: u64,
    pub internal_recent_skipped_count: u64,
    pub internal_merge_count: u64,
    pub get_snapshot_time: u64,
    pub get_from_memtable_time: u64,
    pub get_from_memtable_count: u64,
    pub get_post_process_time: u64,
    pub get_from_output_files_time: u64,
    pub seek_on_memtable_time: u64,
    pub seek_on_memtable_count: u64,
    pub next_on_memtable_count: u64,
    pub prev_on_memtable_count: u64,
    pub seek_child_seek_time: u64,
    pub seek_child_seek_count: u64,
    pub seek_min_heap_time: u64,
    pub seek_max_heap_time: u64,
    pub seek_internal_seek_time: u64,
    pub find_next_user_entry_time: u64,
    pub write_wal_time: u64,
    pub write_memtable_time: u64,
    pub write_delay_time: u64,
    pub write_pre_and_post_process_time: u64,
    pub db_mutex_lock_nanos: u64,
    pub db_condition_wait_nanos: u64,
    pub merge_operator_time_nanos: u64,
    pub read_index_block_nanos: u64,
    pub read_filter_block_nanos: u64,
    pub new_table_block_iter_nanos: u64,
    pub new_table_iterator_nanos: u64,
    pub block_seek_nanos: u64,
    pub find_table_nanos: u64,
    pub bloom_memtable_hit_count: u64,
    pub bloom_memtable_miss_count: u64,
    pub bloom_sst_hit_count: u64,
    pub bloom_sst_miss_count: u64,
}

A thread local context for gathering performance counter efficiently and transparently.

Use SetPerfLevel(PerfLevel::kEnableTime) to enable time stats.

Fields

user_key_comparison_count: u64

total number of user key comparisons

block_cache_hit_count: u64

total number of block cache hits

block_read_count: u64

total number of block reads (with IO)

block_read_byte: u64

total number of bytes from block reads

block_read_time: u64

total nanos spent on block reads

block_checksum_time: u64

total nanos spent on block checksum

block_decompress_time: u64

total nanos spent on block decompression

internal_key_skipped_count: u64

total number of internal keys skipped over during iteration.

There are several reasons for it:

  1. when calling Next(), the iterator is in the position of the previous key, so that we'll need to skip it. It means this counter will always be incremented in Next().
  2. when calling Next(), we need to skip internal entries for the previous keys that are overwritten.
  3. when calling Next(), Seek() or SeekToFirst(), after previous key before calling Next(), the seek key in Seek() or the beginning for SeekToFirst(), there may be one or more deleted keys before the next valid key that the operation should place the iterator to. We need to skip both of the tombstone and updates hidden by the tombstones. The tombstones are not included in this counter, while previous updates hidden by the tombstones will be included here.
  4. symmetric cases for Prev() and SeekToLast()

internal_recent_skipped_count is not included in this counter.

internal_delete_skipped_count: u64

Total number of deletes and single deletes skipped over during iteration

When calling Next(), Seek() or SeekToFirst(), after previous position before calling Next(), the seek key in Seek() or the beginning for SeekToFirst(), there may be one or more deleted keys before the next valid key. Every deleted key is counted once. We don't recount here if there are still older updates invalidated by the tombstones.

internal_recent_skipped_count: u64

How many times iterators skipped over internal keys that are more recent than the snapshot that iterator is using.

internal_merge_count: u64

How many values were fed into merge operator by iterators.

get_snapshot_time: u64

total nanos spent on getting snapshot

get_from_memtable_time: u64

total nanos spent on querying memtables

get_from_memtable_count: u64

number of mem tables queried

get_post_process_time: u64

total nanos spent after Get() finds a key

get_from_output_files_time: u64

total nanos reading from output files

seek_on_memtable_time: u64

total nanos spent on seeking memtable

seek_on_memtable_count: u64

number of seeks issued on memtable (including SeekForPrev but not SeekToFirst and SeekToLast)

next_on_memtable_count: u64

number of Next()s issued on memtable

prev_on_memtable_count: u64

number of Prev()s issued on memtable

seek_child_seek_time: u64

total nanos spent on seeking child iters

seek_child_seek_count: u64

number of seek issued in child iterators

seek_min_heap_time: u64

total nanos spent on the merge min heap

seek_max_heap_time: u64

total nanos spent on the merge max heap

seek_internal_seek_time: u64

total nanos spent on seeking the internal entries

find_next_user_entry_time: u64

total nanos spent on iterating internal entries to find the next user entry

write_wal_time: u64

total nanos spent on writing to WAL

write_memtable_time: u64

total nanos spent on writing to mem tables

write_delay_time: u64

total nanos spent on delaying write

write_pre_and_post_process_time: u64

total nanos spent on writing a record, excluding the above three times

db_mutex_lock_nanos: u64

time spent on acquiring DB mutex.

db_condition_wait_nanos: u64

Time spent on waiting with a condition variable created with DB mutex.

merge_operator_time_nanos: u64

Time spent on merge operator.

read_index_block_nanos: u64

Time spent on reading index block from block cache or SST file

read_filter_block_nanos: u64

Time spent on reading filter block from block cache or SST file

new_table_block_iter_nanos: u64

Time spent on creating data block iterator

new_table_iterator_nanos: u64

Time spent on creating a iterator of an SST file.

block_seek_nanos: u64

Time spent on seeking a key in data/index blocks

find_table_nanos: u64

Time spent on finding or creating a table reader

bloom_memtable_hit_count: u64

total number of mem table bloom hits

bloom_memtable_miss_count: u64

total number of mem table bloom misses

bloom_sst_hit_count: u64

total number of SST table bloom hits

bloom_sst_miss_count: u64

total number of SST table bloom misses

Implementations

impl PerfContext[src]

pub fn current() -> &'static mut PerfContext[src]

PerfContext for current thread

pub fn reset(&mut self)[src]

reset all performance counters to zero

Trait Implementations

impl Debug for PerfContext[src]

impl Display for PerfContext[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.