Inter-event timing metrics on top of tracing
.
This crate provides a tracing::Subscriber
that keeps statistics on
inter-event timing information. More concretely, given code like this:
use *;
use ;
let subscriber = from.build;
let dispatcher = new;
with_default;
You can produce something like this:
fast:
50µs |
100µs |
150µs | ****
200µs | ************
250µs | *************
300µs | *****
350µs | ****
400µs | *
450µs |
500µs |
slow:
550µs |
600µs |
650µs | ******
700µs | **********************
750µs | *********
800µs | **
850µs | *
900µs |
When TimingSubscriber
is used as the tracing::Dispatch
, the time
between each event in a span is measured using quanta
, and is
recorded in "high dynamic range histograms" using hdrhistogram
's
multi-threaded recording facilities. The recorded timing information is
grouped using the SpanGroup
and EventGroup
traits, allowing you to
combine recorded statistics across spans and events.