pub struct DfirMetricsIntervals { /* private fields */ }Expand description
A handle into a DFIR instance’s metrics, where each call to Self::take_interval ends the current interval and
returns its metrics. Obtained via Dfir::metrics_intervals.
The first call to take_interval returns metrics since this DFIR instance was created. Each subsequent call to
take_interval returns metrics since the previous call.
Cloning the handle “forks” it from the original, as afterwards each interval may return different metrics
depending on when exactly take_interval is called.
Implementations§
Source§impl DfirMetricsIntervals
impl DfirMetricsIntervals
Sourcepub fn take_interval(&mut self) -> DfirMetrics
pub fn take_interval(&mut self) -> DfirMetrics
Ends the current interval and returns the accumulated metrics across the interval.
The first call to take_interval returns metrics since this DFIR instance was created. Each subsequent call to
take_interval returns metrics since the previous call.
Sourcepub fn all_metrics(&self) -> Arc<DfirMetrics> ⓘ
pub fn all_metrics(&self) -> Arc<DfirMetrics> ⓘ
Returns a reference-counted handle to the original continually-updated runtime metrics for this DFIR instance.
See Dfir::metrics.
Trait Implementations§
Auto Trait Implementations§
impl Forget for DfirMetricsIntervals
impl Freeze for DfirMetricsIntervalswhere
*const ArcInner<DfirMetrics> is !null: Freeze,
PhantomData<ArcInner<DfirMetrics>>: Freeze,
*const u8 is !null: Freeze,
PhantomData<Slot<SubgraphMetrics>>: Freeze,
PhantomData<fn(GraphSubgraphId) -> GraphSubgraphId>: Freeze,
PhantomData<Slot<HandoffMetrics>>: Freeze,
PhantomData<fn(GraphNodeId) -> GraphNodeId>: Freeze,
impl Move for DfirMetricsIntervals
impl RefUnwindSafe for DfirMetricsIntervals
impl Send for DfirMetricsIntervals
impl Sync for DfirMetricsIntervals
impl Unpin for DfirMetricsIntervals
impl UnsafeUnpin for DfirMetricsIntervalswhere
*const ArcInner<DfirMetrics> is !null: UnsafeUnpin,
PhantomData<ArcInner<DfirMetrics>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<Slot<SubgraphMetrics>>: UnsafeUnpin,
PhantomData<fn(GraphSubgraphId) -> GraphSubgraphId>: UnsafeUnpin,
PhantomData<Slot<HandoffMetrics>>: UnsafeUnpin,
PhantomData<fn(GraphNodeId) -> GraphNodeId>: UnsafeUnpin,
impl UnwindSafe for DfirMetricsIntervalswhere
Arc<DfirMetrics>: UnwindSafe,
RawVecInner: UnwindSafe,
Align8<usize>: UnwindSafe,
Align8<u64>: UnwindSafe,
NonZero<u32>: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> ToSinkBuild for T
impl<T> ToSinkBuild for T
§fn iter_to_sink_build(self) -> SendIterBuild<Self>
fn iter_to_sink_build(self) -> SendIterBuild<Self>
§fn stream_to_sink_build(self) -> SendStreamBuild<Self>where
Self: Sized + Stream,
fn stream_to_sink_build(self) -> SendStreamBuild<Self>where
Self: Sized + Stream,
SinkBuild] adaptor chain to send all items from self as a [Stream].