#[non_exhaustive]pub struct DfirMetrics {
pub subgraphs: SecondaryMap<GraphSubgraphId, SubgraphMetrics>,
pub handoffs: SecondaryMap<GraphNodeId, HandoffMetrics>,
}Expand description
Metrics for a Dfir graph instance.
Call Dfir::metrics for reference-counted continually-updated metrics,
or call Dfir::metrics_intervals to obtain a DfirMetricsIntervals handle, and use
DfirMetricsIntervals::take_interval to retrieve metrics for successive intervals.
§Thread safety
All counters are atomics, so the live metrics may be read from any thread (e.g. a metrics
reporting task) while the dataflow is running. Each individual counter is always consistent, but
a snapshot (via Clone or DfirMetricsIntervals::take_interval) taken from another thread
may observe counters from slightly different moments in time relative to each other (e.g.
SubgraphMetrics::total_run_count incremented but SubgraphMetrics::total_poll_duration
not yet updated for that run).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.subgraphs: SecondaryMap<GraphSubgraphId, SubgraphMetrics>Per-subgraph metrics.
handoffs: SecondaryMap<GraphNodeId, HandoffMetrics>Per-handoff metrics.
Trait Implementations§
Source§impl Clone for DfirMetrics
impl Clone for DfirMetrics
Source§impl Default for DfirMetrics
impl Default for DfirMetrics
Source§impl MetricsState for DfirMetrics
Metrics are tracked.
impl MetricsState for DfirMetrics
Metrics are tracked.
Source§type Handle = Arc<DfirMetrics>
type Handle = Arc<DfirMetrics>
Arc<DfirMetrics> or ().Auto Trait Implementations§
impl Forget for DfirMetrics
impl Freeze for DfirMetrics
impl Move for DfirMetrics
impl RefUnwindSafe for DfirMetrics
impl Send for DfirMetrics
impl Sync for DfirMetrics
impl Unpin for DfirMetrics
impl UnsafeUnpin for DfirMetrics
impl UnwindSafe for DfirMetrics
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].