[][src]Struct rocks::iostats_context::IOStatsContext

#[repr(C)]pub struct IOStatsContext {
    pub thread_pool_id: u64,
    pub bytes_written: u64,
    pub bytes_read: u64,
    pub open_nanos: u64,
    pub allocate_nanos: u64,
    pub write_nanos: u64,
    pub read_nanos: u64,
    pub range_sync_nanos: u64,
    pub fsync_nanos: u64,
    pub prepare_write_nanos: u64,
    pub logger_nanos: u64,
}

A thread local context for gathering io-stats efficiently and transparently.

Fields

thread_pool_id: u64

the thread pool id

bytes_written: u64

number of bytes that has been written.

bytes_read: u64

number of bytes that has been read.

open_nanos: u64

time spent in open() and fopen().

allocate_nanos: u64

time spent in fallocate().

write_nanos: u64

time spent in write() and pwrite().

read_nanos: u64

time spent in read() and pread()

range_sync_nanos: u64

time spent in sync_file_range().

fsync_nanos: u64

time spent in fsync

prepare_write_nanos: u64

time spent in preparing write (fallocate etc).

logger_nanos: u64

time spent in Logger::Logv().

Implementations

impl IOStatsContext[src]

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

IOStatsContext for current thread

pub fn reset(&mut self)[src]

reset all io-stats counter to zero

Trait Implementations

impl Debug for IOStatsContext[src]

impl Display for IOStatsContext[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.