pub struct NoopEventSink;Expand description
A no-op implementation of EventSink for testing and benchmarking.
All methods are empty. Returns ObservabilityLevel::Off.
§Examples
use torvyn_types::{NoopEventSink, EventSink, FlowId, ComponentId, ObservabilityLevel};
use torvyn_types::InvocationStatus;
let sink = NoopEventSink;
sink.record_invocation(FlowId::new(1), ComponentId::new(1), 0, 100, InvocationStatus::Ok);
assert_eq!(sink.level(), ObservabilityLevel::Off);Trait Implementations§
Source§impl Clone for NoopEventSink
impl Clone for NoopEventSink
Source§fn clone(&self) -> NoopEventSink
fn clone(&self) -> NoopEventSink
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl EventSink for NoopEventSink
impl EventSink for NoopEventSink
Source§fn record_invocation(
&self,
_flow_id: FlowId,
_component_id: ComponentId,
_start_ns: u64,
_end_ns: u64,
_status: InvocationStatus,
)
fn record_invocation( &self, _flow_id: FlowId, _component_id: ComponentId, _start_ns: u64, _end_ns: u64, _status: InvocationStatus, )
Record a component invocation completion. Read more
Source§fn record_element_transfer(
&self,
_flow_id: FlowId,
_stream_id: StreamId,
_element_sequence: u64,
_queue_depth_after: u32,
)
fn record_element_transfer( &self, _flow_id: FlowId, _stream_id: StreamId, _element_sequence: u64, _queue_depth_after: u32, )
Record a stream element transfer between components. Read more
Source§fn record_backpressure(
&self,
_flow_id: FlowId,
_stream_id: StreamId,
_activated: bool,
_queue_depth: u32,
_timestamp_ns: u64,
)
fn record_backpressure( &self, _flow_id: FlowId, _stream_id: StreamId, _activated: bool, _queue_depth: u32, _timestamp_ns: u64, )
Record a backpressure state change. Read more
Source§fn record_copy(
&self,
_flow_id: FlowId,
_resource_id: ResourceId,
_from_component: ComponentId,
_to_component: ComponentId,
_copy_bytes: u64,
_reason: CopyReason,
)
fn record_copy( &self, _flow_id: FlowId, _resource_id: ResourceId, _from_component: ComponentId, _to_component: ComponentId, _copy_bytes: u64, _reason: CopyReason, )
Record a resource copy operation. Read more
Source§fn level(&self) -> ObservabilityLevel
fn level(&self) -> ObservabilityLevel
Returns the current observability level. Read more
impl Copy for NoopEventSink
Auto Trait Implementations§
impl Freeze for NoopEventSink
impl RefUnwindSafe for NoopEventSink
impl Send for NoopEventSink
impl Sync for NoopEventSink
impl Unpin for NoopEventSink
impl UnwindSafe for NoopEventSink
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