pub struct MonitorFeed {
pub watch: Arc<dyn Fn(Watched) -> Box<dyn Send> + Send + Sync>,
pub samples: Sender<Sample>,
pub beat: Arc<dyn Fn(BeatMs) + Send + Sync>,
}Expand description
The performance monitor as a session sees it (crates/wire/spec/Frames/Monitor.lean §8-47g).
Whether anybody watches is decided where the history is kept; a
session holds what watch returned for as long as it watches, and
dropping that value is how it stops counting.
Fields§
§watch: Arc<dyn Fn(Watched) -> Box<dyn Send> + Send + Sync>§samples: Sender<Sample>One reading a second while anybody watches. A reading a slow session missed is not stated: the next one is a second away.
beat: Arc<dyn Fn(BeatMs) + Send + Sync>Sets the beat the monitor samples at and remembers it for the
city (crates/wire/spec/Frames/Monitor.lean §8-47i).
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for MonitorFeed
impl !UnwindSafe for MonitorFeed
impl Freeze for MonitorFeed
impl Send for MonitorFeed
impl Sync for MonitorFeed
impl Unpin for MonitorFeed
impl UnsafeUnpin for MonitorFeed
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