pub struct MicroControlObserver { /* private fields */ }Expand description
Micro-control observer using ActorRef<Telemetry> for event dispatch.
Implementations§
Source§impl MicroControlObserver
impl MicroControlObserver
Sourcepub fn with_actor(tx: ActorRef<Telemetry>) -> Self
pub fn with_actor(tx: ActorRef<Telemetry>) -> Self
Create an observer that sends events to the given actor.
Sourcepub fn observe_start(&self, component: &str) -> OperationGuard
pub fn observe_start(&self, component: &str) -> OperationGuard
Start observing an operation for the given component.
Sourcepub fn observe_start_with_params(
&self,
component: &str,
port: PortId,
_parameter: &ParameterId,
) -> OperationGuard
pub fn observe_start_with_params( &self, component: &str, port: PortId, _parameter: &ParameterId, ) -> OperationGuard
Start observing with parameter context (port + parameter).
Sourcepub fn record_violation(
&self,
component: &str,
expected_ns: u64,
actual_ns: u64,
value: Option<f32>,
)
pub fn record_violation( &self, component: &str, expected_ns: u64, actual_ns: u64, value: Option<f32>, )
Record a timing violation for a component.
Sourcepub fn component_stats(&self, component: &str) -> Option<ComponentStats>
pub fn component_stats(&self, component: &str) -> Option<ComponentStats>
Get statistics for a specific component.
Sourcepub fn violations(&self) -> Vec<Violation>
pub fn violations(&self) -> Vec<Violation>
Get all recorded violations.
Sourcepub fn sandbox_summary(&self) -> SandboxSummary
pub fn sandbox_summary(&self) -> SandboxSummary
Get a summary of the entire sandbox.
Trait Implementations§
Source§impl Clone for MicroControlObserver
impl Clone for MicroControlObserver
Source§fn clone(&self) -> MicroControlObserver
fn clone(&self) -> MicroControlObserver
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for MicroControlObserver
impl !RefUnwindSafe for MicroControlObserver
impl Send for MicroControlObserver
impl Sync for MicroControlObserver
impl Unpin for MicroControlObserver
impl UnsafeUnpin for MicroControlObserver
impl !UnwindSafe for MicroControlObserver
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