nm - nanometer
Collect metrics about observed events with low overhead even in highly multithreaded applications running on 100+ processors.
Using arbitrary development hardware, we measure between 2 and 20 nanoseconds per observation, depending on how the event is configured. Benchmarks are included.
use Event;
use Duration;
thread_local!
// observe_once() observes an event with a nominal magnitude of 1
PACKAGES_RECEIVED.with;
// observe_millis() observes an event with a magnitude in milliseconds
let send_duration = from_millis;
PACKAGE_SEND_DURATION_MS.with;
Collected metrics
For each defined event, the following metrics are collected:
- Count of observations (
u64). - Mean magnitude of observations (
i64). - (Optional) Histogram of magnitudes, with configurable bucket boundaries (
i64).
See also
More details in the package documentation.
This is part of the Folo project that provides mechanisms for high-performance hardware-aware programming in Rust.