16 releases (7 breaking)

✓ Uses Rust 2018 edition

new 0.8.2 Mar 20, 2019
0.7.1 Jan 28, 2019
0.3.0 Dec 22, 2018
0.2.1 Jul 24, 2018

#11 in Visualization

Download history 21/week @ 2018-12-05 8/week @ 2018-12-12 69/week @ 2018-12-19 17/week @ 2018-12-26 20/week @ 2019-01-02 8/week @ 2019-01-09 36/week @ 2019-01-16 80/week @ 2019-01-23 26/week @ 2019-01-30 6/week @ 2019-02-06 9/week @ 2019-02-13 22/week @ 2019-02-20 38/week @ 2019-02-27 6/week @ 2019-03-06 209/week @ 2019-03-13

187 downloads per month
Used in 2 crates

MIT license

59KB
983 lines

hotmic

conduct-badge travis-badge downloads-badge release-badge docs-badge libraries-io-badge cargo-make-badge license-badge

hotmic is a high-speed metrics collection library, based on crossbeam-channel. It is heavily inspired by tic.

code of conduct

NOTE: All conversations and contributions to this project shall adhere to the Code of Conduct.

usage

The API documentation of this library can be found at docs.rs/hotmic.

general features

  • based on crossbeam-channel, so it's blazingly fast
  • supports counters, gauges, and histograms
  • provides dynamic faceting: what portion of metric data should be recorded, and in what way
  • control mechanism to allow any caller to retrieve metric snapshots at any time
  • scoped metrics (one metric with different prefixes)

performance

This section used to have way higher numbers, and a full comparison vs tic, but based on recent refactoring, the numbers are off. Here's a quick look at the current performance of hotmic:

# RUST_LOG=debug target/release/examples/benchmark --duration 30 --producers 1 --capacity 4096
[2019-01-20T00:49:06Z INFO  benchmark] rate: 4991107.330041891 samples per second
[2019-01-20T00:49:06Z INFO  benchmark] latency (ns): p50: 389 p90: 422 p99: 520 p999: 783 max: 2077695
[2019-01-20T00:49:07Z INFO  benchmark] total metrics pushed: 296547696

The latency values are measured from the perspective of the thread sending into the metric sink. This section will contain better data -- including visual aids! -- in the near future.

Dependencies

~4.5MB
~75K SLoC