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
impl TraceOptions
Sourcepub fn set_max_trace_file_size(&mut self, size: u64)
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
Sourcepub fn get_max_trace_file_size(&self) -> u64
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.
Sourcepub fn set_sampling_frequency(&mut self, frequency: u64)
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.
Sourcepub fn get_sampling_frequency(&self) -> u64
pub fn get_sampling_frequency(&self) -> u64
Returns the current sampling_frequency setting.
See Self::set_sampling_frequency for what this controls.
Sourcepub fn set_filter(&mut self, filter: TraceFilter)
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.
Sourcepub fn get_filter(&self) -> TraceFilter
pub fn get_filter(&self) -> TraceFilter
Returns the current filter setting.
See Self::set_filter for what this controls.
Sourcepub fn set_preserve_write_order(&mut self, v: bool)
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.
Sourcepub fn get_preserve_write_order(&self) -> bool
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.