#[repr(i32)]pub enum WriteFlushMode {
WriteFlushUnspecified = 0,
WriteFlushAuto = 1,
WriteFlushDisabled = 2,
WriteFlushEnabled = 3,
}Variants§
WriteFlushUnspecified = 0
Same as WRITE_FLUSH_AUTO.
WriteFlushAuto = 1
Default mode. The service automatically determines the flush frequency to balance performance and data freshness:
- If file_write_period_ms <= 5s (kDefaultWriteIntoFilePeriodMs): Flushes are NOT issued on every write. Instead, a periodic flush is issued every 5s.
- If file_write_period_ms > 5s: A flush is issued before every periodic write into the file.
WriteFlushDisabled = 2
Do not flush buffers before periodic writes into the file. Use this mode if you want to minimize the performance impact of flushes and can tolerate potentially missing the most recent data in the trace file until the end of the session or an explicit flush. When this mode is selected, |flush_period_ms| is respected.
WriteFlushEnabled = 3
Issue a flush before every periodic write into the file. This ensures that each write into the file contains the most up-to-date data from all data sources, but may have a higher performance overhead.
Implementations§
Source§impl WriteFlushMode
impl WriteFlushMode
Sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
Trait Implementations§
Source§impl Clone for WriteFlushMode
impl Clone for WriteFlushMode
Source§fn clone(&self) -> WriteFlushMode
fn clone(&self) -> WriteFlushMode
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WriteFlushMode
impl Debug for WriteFlushMode
Source§impl Default for WriteFlushMode
impl Default for WriteFlushMode
Source§fn default() -> WriteFlushMode
fn default() -> WriteFlushMode
Source§impl From<WriteFlushMode> for i32
impl From<WriteFlushMode> for i32
Source§fn from(value: WriteFlushMode) -> i32
fn from(value: WriteFlushMode) -> i32
Source§impl Hash for WriteFlushMode
impl Hash for WriteFlushMode
Source§impl Ord for WriteFlushMode
impl Ord for WriteFlushMode
Source§fn cmp(&self, other: &WriteFlushMode) -> Ordering
fn cmp(&self, other: &WriteFlushMode) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for WriteFlushMode
impl PartialEq for WriteFlushMode
Source§fn eq(&self, other: &WriteFlushMode) -> bool
fn eq(&self, other: &WriteFlushMode) -> bool
self and other values to be equal, and is used by ==.