photon-ring-metrics 2.5.0

Metrics and observability wrappers for photon-ring pub/sub channels
Documentation
  • Coverage
  • 100%
    15 out of 15 items documented1 out of 9 items with examples
  • Size
  • Source code size: 17.89 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.67 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 34s Average build duration of successful builds.
  • all releases: 34s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • userFRM/photon-ring
    3 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • userFRM

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);