Crate tic [−] [src]
tic - time interval counter a high-performance stats library for Rust projects
About
tic is using Histograms and Heatmaps for storing all Samples. Simply
timestamp your start and start events, and pass those along with a metric
label to Sample::new(); Your metric label could be an Enum, or a String,
or Integer, or ...). Sender is clonable and can be shared across many
threads. A single Receiver is capable of processing millions of samples
per second. Performance is a top priority
Goals
- high-performance stats library for use in Rust projects
- export derived metrics as well as histograms
Future work
- tests, tests, tests
- improve the documentation
- make it suitable for long-running applications
- stats aggregator
- extensive benchmarking
- optimization efforts, memory footprint and speed
Usage
The pattern is to create a Receiver, aquire a Sender from the Receiver, and
send Samples along the sender
Example
Checkout benches/src/main.rs
Structs
| Config |
a configuration struct for customizing |
| Receiver |
a |
| Sample |
a start and stop time for a metric |
| Sender |
a Sender is used to push |
Enums
| Interest |
an Interest registers a metric for reporting |