pub struct MetricConfig { /* private fields */ }Expand description
Configuration values for metrics.
Implementations§
Source§impl MetricConfig
impl MetricConfig
Sourcepub const DEFAULT_NUM_SAMPLES: i32 = 2
pub const DEFAULT_NUM_SAMPLES: i32 = 2
Default number of samples for a windowed stat.
Sourcepub fn event_window(&self) -> i64
pub fn event_window(&self) -> i64
The number of events in an event window.
Sourcepub fn set_event_window(self, window: i64) -> Self
pub fn set_event_window(self, window: i64) -> Self
Set the event window.
Sourcepub fn time_window_ms(&self) -> i64
pub fn time_window_ms(&self) -> i64
The time window in milliseconds.
Sourcepub fn set_time_window_ms(self, window_ms: i64) -> Self
pub fn set_time_window_ms(self, window_ms: i64) -> Self
Set the time window in milliseconds.
Sourcepub fn set_time_window(self, window: i64, unit: TimeUnit) -> Self
pub fn set_time_window(self, window: i64, unit: TimeUnit) -> Self
Set the time window expressed in the given unit, mirroring Java’s
MetricConfig.timeWindow(long window, TimeUnit unit).
The default tags for metrics using this config.
Set the default tags.
Sourcepub fn set_samples(self, samples: i32) -> Self
pub fn set_samples(self, samples: i32) -> Self
Set the number of samples. Panics if samples < 1, mirroring Java’s
IllegalArgumentException — this is a configuration-time programming
error rather than a recoverable runtime condition.
Sourcepub fn record_level(&self) -> RecordingLevel
pub fn record_level(&self) -> RecordingLevel
The recording level.
Sourcepub fn set_record_level(self, recording_level: RecordingLevel) -> Self
pub fn set_record_level(self, recording_level: RecordingLevel) -> Self
Set the recording level.
Trait Implementations§
Source§impl Clone for MetricConfig
impl Clone for MetricConfig
Source§fn clone(&self) -> MetricConfig
fn clone(&self) -> MetricConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MetricConfig
impl Debug for MetricConfig
Auto Trait Implementations§
impl Freeze for MetricConfig
impl RefUnwindSafe for MetricConfig
impl Send for MetricConfig
impl Sync for MetricConfig
impl Unpin for MetricConfig
impl UnsafeUnpin for MetricConfig
impl UnwindSafe for MetricConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more