pub struct ProcessActivityTracker { /* private fields */ }Expand description
Process traffic view derived from active and retained historic connections.
Implementations§
Source§impl ProcessActivityTracker
impl ProcessActivityTracker
pub fn new() -> Self
pub fn with_config(config: ProcessActivityConfig) -> Self
Sourcepub fn observe_connections(
&mut self,
connections: &[Connection],
now: SystemTime,
)
pub fn observe_connections( &mut self, connections: &[Connection], now: SystemTime, )
Aggregate one complete active-plus-historic connection view. Repeated observations are idempotent because compact per-flow counters contribute only newly observed bytes.
Sourcepub fn observe_sources<A, H>(
&mut self,
now: SystemTime,
feed_active: A,
feed_historic: H,
)
pub fn observe_sources<A, H>( &mut self, now: SystemTime, feed_active: A, feed_historic: H, )
Stream active and historic sources into one sample without cloning
their full Connection values.
The historic callback is replayed once to choose a deterministic, bounded set of completed process identities and once to aggregate it. Callers must therefore provide stable sources for the duration of this synchronous method.
pub fn snapshot(&self) -> ProcessActivitySnapshot
pub fn clear(&mut self)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ProcessActivityTracker
impl RefUnwindSafe for ProcessActivityTracker
impl Send for ProcessActivityTracker
impl Sync for ProcessActivityTracker
impl Unpin for ProcessActivityTracker
impl UnsafeUnpin for ProcessActivityTracker
impl UnwindSafe for ProcessActivityTracker
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