rift-metrics
Part of the riftd project — serverless P2P voice + text chat over UDP.
What's in this crate?
rift-metrics provides lightweight, thread-safe metrics collection:
- Connection Stats — Track active connections and lifetime totals
- Latency Metrics — RTT measurements and histograms
- Throughput — Bytes sent/received tracking
- NAT Traversal — Success/failure rates for hole punching
- Global Registry — Thread-safe access via
Metrics::global()
Usage
use Metrics;
let metrics = global;
metrics.record_connection;
metrics.record_bytes_sent;
let snapshot = metrics.snapshot;
println!;
Related Crates
| Crate | Description |
|---|---|
| rift-mesh | Mesh networking (uses metrics) |
| rift-nat | NAT traversal (reports metrics) |
Citation
If you use riftd in academic work, please cite:
de Beer, R. (2026). Predictive Rendezvous: Time–Intent–Deterministic Peer Coordination Without Infrastructure. Zenodo. https://doi.org/10.5281/zenodo.18528430
License
Licensed under either of Apache License, Version 2.0 or MIT license at your option.