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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for NoopEventSink
Source§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
Source§fn record_flow_latency(&self, flow_id: FlowId, latency_ns: u64)
fn record_flow_latency(&self, flow_id: FlowId, latency_ns: u64)
Record an element’s end-to-end latency through the flow. Read more
Source§fn record_element_span(
&self,
flow_id: FlowId,
component_id: ComponentId,
element_sequence: u64,
start_ns: u64,
end_ns: u64,
status: InvocationStatus,
)
fn record_element_span( &self, flow_id: FlowId, component_id: ComponentId, element_sequence: u64, start_ns: u64, end_ns: u64, status: InvocationStatus, )
Record one component invocation as a per-element span. Read more
Source§fn flow_trace_context(&self, flow_id: FlowId) -> Option<TraceContext>
fn flow_trace_context(&self, flow_id: FlowId) -> Option<TraceContext>
The trace context assigned to a flow, if this sink is tracing it. Read more
Source§fn on_flow_start(
&self,
flow_id: FlowId,
component_ids: &[ComponentId],
stream_ids: &[StreamId],
)
fn on_flow_start( &self, flow_id: FlowId, component_ids: &[ComponentId], stream_ids: &[StreamId], )
Pre-register a flow’s per-flow metric state before its driver starts. Read more
Auto Trait Implementations§
impl Freeze for NoopEventSink
impl RefUnwindSafe for NoopEventSink
impl Send for NoopEventSink
impl Sync for NoopEventSink
impl Unpin for NoopEventSink
impl UnsafeUnpin 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