pub struct TelemetryCollector { /* private fields */ }
Expand description
Main telemetry collector
Implementations§
Source§impl TelemetryCollector
impl TelemetryCollector
Sourcepub fn new(config: TelemetryConfig) -> Self
pub fn new(config: TelemetryConfig) -> Self
Create new telemetry collector
Sourcepub fn record_metric(&self, metric: TelemetryMetric) -> Result<()>
pub fn record_metric(&self, metric: TelemetryMetric) -> Result<()>
Record a metric
Sourcepub fn record_quantum_metrics(&self, metrics: QuantumMetrics) -> Result<()>
pub fn record_quantum_metrics(&self, metrics: QuantumMetrics) -> Result<()>
Record quantum simulation metrics
Sourcepub fn record_gate_execution(
&self,
gate: &InterfaceGate,
duration: Duration,
) -> Result<()>
pub fn record_gate_execution( &self, gate: &InterfaceGate, duration: Duration, ) -> Result<()>
Record gate execution timing
Sourcepub fn record_circuit_execution(
&self,
circuit: &InterfaceCircuit,
duration: Duration,
) -> Result<()>
pub fn record_circuit_execution( &self, circuit: &InterfaceCircuit, duration: Duration, ) -> Result<()>
Record circuit execution metrics
Sourcepub fn record_memory_usage(
&self,
bytes_used: usize,
category: &str,
) -> Result<()>
pub fn record_memory_usage( &self, bytes_used: usize, category: &str, ) -> Result<()>
Record memory usage
Sourcepub fn record_error(&self, error_type: &str, error_message: &str) -> Result<()>
pub fn record_error(&self, error_type: &str, error_message: &str) -> Result<()>
Record error event
Sourcepub fn get_metrics_summary(&self) -> Result<MetricsSummary>
pub fn get_metrics_summary(&self) -> Result<MetricsSummary>
Get current metrics summary
Sourcepub fn export_data(&self, path: &str) -> Result<()>
pub fn export_data(&self, path: &str) -> Result<()>
Export telemetry data
Auto Trait Implementations§
impl Freeze for TelemetryCollector
impl !RefUnwindSafe for TelemetryCollector
impl Send for TelemetryCollector
impl Sync for TelemetryCollector
impl Unpin for TelemetryCollector
impl !UnwindSafe for TelemetryCollector
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.