MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / telemetry_sender

Function telemetry_sender

crates/openshell-core/src/telemetry.rs:412–423  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

410
411#[cfg(feature = "telemetry")]
412fn telemetry_sender() -> Option<&'static mpsc::SyncSender<TelemetryEvent>> {
413 TELEMETRY_SENDER
414 .get_or_init(|| {
415 let (tx, rx) = mpsc::sync_channel(TELEMETRY_EVENT_QUEUE_CAPACITY);
416 thread::Builder::new()
417 .name("openshell-telemetry".to_string())
418 .spawn(move || telemetry_worker(rx))
419 .ok()
420 .map(|_| tx)
421 })
422 .as_ref()
423}
424
425#[cfg(feature = "telemetry")]
426fn telemetry_worker(rx: mpsc::Receiver<TelemetryEvent>) {

Callers 1

emit_eventFunction · 0.85

Calls 3

telemetry_workerFunction · 0.85
spawnMethod · 0.45
nameMethod · 0.45

Tested by

no test coverage detected