Skip to main content

CompactionJobStats

Struct CompactionJobStats 

Source
pub struct CompactionJobStats<'a> { /* private fields */ }
Expand description

What one compaction job did, borrowed from the event that reported it.

Read from a compaction job info or a subcompaction job info. Counters that are not applicable to the compaction, or that RocksDB was not asked to collect, read back as 0.

Implementations§

Source§

impl<'a> CompactionJobStats<'a>

Source

pub fn elapsed_micros(&self) -> u64

Wall clock time this compaction took, in microseconds.

Source

pub fn cpu_micros(&self) -> u64

CPU time this compaction took, in microseconds.

Source

pub fn has_accurate_num_input_records(&self) -> bool

Whether Self::num_input_records is accurate across all subcompactions.

Source

pub fn num_input_records(&self) -> u64

Number of compaction input records. Only trustworthy when Self::has_accurate_num_input_records is true.

Source

pub fn num_blobs_read(&self) -> u64

Number of blobs read from blob files.

Source

pub fn num_input_files(&self) -> usize

Number of compaction input files, counting table files only.

Source

pub fn num_input_files_at_output_level(&self) -> usize

Number of compaction input table files that were already at the output level.

Source

pub fn num_filtered_input_files(&self) -> usize

Number of compaction input files filtered out by compaction optimizations.

Source

pub fn num_filtered_input_files_at_output_level(&self) -> usize

Number of compaction input files at the output level that were filtered out by compaction optimizations.

Source

pub fn num_output_records(&self) -> u64

Number of compaction output records.

Source

pub fn num_output_files(&self) -> usize

Number of compaction output table files.

Source

pub fn num_output_files_blob(&self) -> usize

Number of compaction output blob files.

Source

pub fn is_full_compaction(&self) -> bool

Whether this was a full compaction, meaning every live SST file was an input.

Source

pub fn is_manual_compaction(&self) -> bool

Whether this was a manual compaction.

Source

pub fn is_remote_compaction(&self) -> bool

Whether the compaction ran in a remote worker.

Only the compaction completed event carries the truth. On the compaction begin event RocksDB sets this to true whenever a compaction_service is configured, before it knows whether the job will really be scheduled remotely or fall back to local.

Source

pub fn total_input_bytes(&self) -> u64

Total size of the table files in the compaction input.

Source

pub fn total_skipped_input_bytes(&self) -> u64

Total size of the input table files that were skipped because compaction optimizations filtered them out.

Source

pub fn total_blob_bytes_read(&self) -> u64

Total size of the blobs read from blob files.

Source

pub fn total_output_bytes(&self) -> u64

Total size of the table files in the compaction output.

Source

pub fn total_output_bytes_blob(&self) -> u64

Total size of the blob files in the compaction output.

Source

pub fn num_input_files_trivially_moved(&self) -> usize

Number of input files that were trivially moved rather than rewritten.

Source

pub fn num_records_replaced(&self) -> u64

Number of records superseded by a newer record for the same key. Counts both updates and deletions.

Source

pub fn total_input_raw_key_bytes(&self) -> u64

Sum of the uncompressed input keys, in bytes.

Source

pub fn total_input_raw_value_bytes(&self) -> u64

Sum of the uncompressed input values, in bytes.

Source

pub fn num_input_deletion_records(&self) -> u64

Number of deletion entries before the compaction. Deletion entries can disappear during compaction because they expired.

Source

pub fn num_expired_deletion_records(&self) -> u64

Number of deletion records dropped as obsolete because every deletion they could still cause has already happened.

Source

pub fn num_corrupt_keys(&self) -> u64

Number of corrupt keys encountered and written out, meaning keys that failed to parse as internal keys.

Source

pub fn file_write_nanos(&self) -> u64

Time spent in file Append calls, in nanoseconds.

Only populated when report_bg_io_stats is on.

Source

pub fn file_range_sync_nanos(&self) -> u64

Time spent syncing file ranges, in nanoseconds.

Only populated when report_bg_io_stats is on.

Source

pub fn file_fsync_nanos(&self) -> u64

Time spent in file fsync, in nanoseconds.

Only populated when report_bg_io_stats is on.

Source

pub fn file_prepare_write_nanos(&self) -> u64

Time spent preparing file writes, such as fallocate, in nanoseconds.

Only populated when report_bg_io_stats is on.

Source

pub fn smallest_output_key_prefix(&self) -> &'a [u8]

First 8 bytes of the smallest user key in the output, or fewer if the key is shorter.

Empty when the compaction wrote no table files.

Source

pub fn largest_output_key_prefix(&self) -> &'a [u8]

First 8 bytes of the largest user key in the output, or fewer if the key is shorter.

Empty when the compaction wrote no table files.

Source

pub fn num_single_del_fallthru(&self) -> u64

Number of single deletes that did not meet a put.

Source

pub fn num_single_del_mismatch(&self) -> u64

Number of single deletes that met something other than a put.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.