[−][src]Struct ckb_metrics_runtime::Builder
Builder for Receiver
.
Implementations
impl Builder
[src]
pub fn new() -> Self
[src]
Creates a new Builder
with default values.
pub fn histogram(self, window: Duration, granularity: Duration) -> Self
[src]
Sets the histogram configuration.
Defaults to a 10 second window with 1 second granularity.
This controls both how long of a time window we track histogram data for, and the granularity in which we roll off old data.
As an example, with the default values, we would keep the last 10 seconds worth of histogram data, and would remove 1 seconds worth of data at a time as the window rolled forward.
pub fn upkeep_interval(self, interval: Duration) -> Self
[src]
Sets the upkeep interval.
Defaults to 50 milliseconds.
This controls how often the time source, used internally by histograms, is updated with the real time. For performance reasons, histograms use a sampled time source when they perform checks to see if internal maintenance needs to occur. If the histogram granularity is set very low, then this interval might need to be similarly reduced to make sure we're able to update the time more often than histograms need to perform upkeep.
pub fn build(self) -> Result<Receiver, BuilderError>
[src]
Create a Receiver
based on this configuration.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Builder
[src]
impl Send for Builder
[src]
impl Sync for Builder
[src]
impl Unpin for Builder
[src]
impl UnwindSafe for Builder
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,