Skip to main content

TraceOptions

Struct TraceOptions 

Source
pub struct TraceOptions { /* private fields */ }
Expand description

Controls what a query trace, IO trace, or block cache trace records.

Passed to the DB when a trace is started. Changing it afterwards has no effect on a trace that is already running.

Implementations§

Source§

impl TraceOptions

Source

pub fn set_max_trace_file_size(&mut self, size: u64)

Stops the trace once the file reaches this many bytes, so a long trace cannot fill the disk.

Default: 64 GiB

Source

pub fn get_max_trace_file_size(&self) -> u64

Returns the current max_trace_file_size setting.

See Self::set_max_trace_file_size for what this controls.

Source

pub fn set_sampling_frequency(&mut self, frequency: u64)

Captures one request out of every frequency. Sampling runs after filtering.

Default: 1, meaning capture every request.

Source

pub fn get_sampling_frequency(&self) -> u64

Returns the current sampling_frequency setting.

See Self::set_sampling_frequency for what this controls.

Source

pub fn set_filter(&mut self, filter: TraceFilter)

Sets which operation types to leave out of the trace. Note the inversion: a bit set here means that operation is not recorded.

Default: TraceFilter::NONE, record everything.

Source

pub fn get_filter(&self) -> TraceFilter

Returns the current filter setting.

See Self::set_filter for what this controls.

Source

pub fn set_preserve_write_order(&mut self, v: bool)

When true, write records land in the trace in the same order they land in the WAL. Costs some write throughput.

Default: false, so traced writes may be ordered differently from the WAL.

Source

pub fn get_preserve_write_order(&self) -> bool

Returns the current preserve_write_order setting.

See Self::set_preserve_write_order for what this controls.

Trait Implementations§

Source§

impl Default for TraceOptions

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Drop for TraceOptions

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more
Source§

impl Send for TraceOptions

Source§

impl Sync for TraceOptions

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.