Expand description
Observability wrappers for photon-ring channels.
Provides framework-agnostic metric snapshots from photon-ring’s built-in
counters (total_received, total_lagged, receive_ratio,
published, pending).
§Example
use photon_ring_metrics::SubscriberMetrics;
let (mut pub_, subs) = photon_ring::channel::<u64>(1024);
let mut sub = subs.subscribe();
let metrics = SubscriberMetrics::new(&sub);
pub_.publish(42);
sub.try_recv().unwrap();
let snapshot = metrics.snapshot(&sub);
assert_eq!(snapshot.total_received, 1);
assert_eq!(snapshot.total_lagged, 0);Structs§
- Publisher
Metrics - Metrics wrapper for a
photon_ring::Publisher. - Publisher
Snapshot - Point-in-time metrics snapshot from a publisher.
- Subscriber
Metrics - Metrics wrapper for a
photon_ring::Subscriber. - Subscriber
Snapshot - Point-in-time metrics snapshot from a subscriber.