pub struct TelemetryService { /* private fields */ }Expand description
Central service for collecting and managing engine-wide telemetry.
The TelemetryService acts as a central registry for all metrics and
resource monitors. It periodically triggers monitor updates and,
if configured, forwards the results to the DCC for higher-level analysis.
Implementations§
Source§impl TelemetryService
impl TelemetryService
Sourcepub fn new(update_interval: Duration) -> Self
pub fn new(update_interval: Duration) -> Self
Creates a new TelemetryService with the specified update interval.
Sourcepub fn with_dcc_sender(self, sender: Sender<TelemetryEvent>) -> Self
pub fn with_dcc_sender(self, sender: Sender<TelemetryEvent>) -> Self
Sets the sender for forwarding events to the DCC.
Sourcepub fn tick(&mut self) -> bool
pub fn tick(&mut self) -> bool
Updates all registered monitors if the update interval has passed.
Returns true if monitors were updated, false otherwise.
Sourcepub fn metrics_registry(&self) -> &MetricsRegistry
pub fn metrics_registry(&self) -> &MetricsRegistry
Returns a reference to the metrics registry.
Sourcepub fn monitor_registry(&self) -> &MonitorRegistry
pub fn monitor_registry(&self) -> &MonitorRegistry
Returns a reference to the monitor registry.
Trait Implementations§
Source§impl Debug for TelemetryService
impl Debug for TelemetryService
Auto Trait Implementations§
impl Freeze for TelemetryService
impl !RefUnwindSafe for TelemetryService
impl Send for TelemetryService
impl Sync for TelemetryService
impl Unpin for TelemetryService
impl !UnwindSafe for TelemetryService
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