We've added two new major types to the crate:
- AtomicBucket, which allows queue-style atomic writes with atomic
snapshots, powered by crossbeam-epoch
- StreamingIntegers, a scalar delta/zigzag/variable-byte integer
compression implementation
These types are a major part of reworking metrics to be event loop-less
and may be eventually be spun out into their own standalone crates, and
they have value outside of just metrics.
We've also really leveled up our documentation and benchmarks, and these
two types now have full benchmark suites to better demonstrate their
value and their performance on a given system.
We now expose all exporters and recorders via facade modules in the
metrics crate, called metrics::exporters and metrics::recorders,
respectively. This means that the metrics crate itself has these are
optional dependencies, which are included by the default set of
features, and so can be turned off by consumers.
To curtail the issue of cyclical dependencies, we've also introduced
three new traits: MetricsSnapshot, SnapshotProvider, and
AsyncSnapshotProvider.
These traits let us represent metrics::Controller and
metrics::data::snapshot::Snapshot in the exporter, allowing us to get
around the cyclical dependency but also expose more flexibility and
modularity.