1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
//! tic - time interval counter
//! a high-performance stats library for Rust projects
//!
//! # About
//! tic is using `Histogram`s and `Heatmap`s for storing all `Sample`s. 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`, acquire a `Sender` from the
//! `Receiver`, and send `Sample`s to the `Sender`
//!
//! # Example
//!
//! Checkout benches/src/main.rs

#[macro_use]
extern crate log;
extern crate bytes;
extern crate clocksource;
extern crate mpmc;
extern crate heatmap;
extern crate histogram;
extern crate waterfall;
extern crate shuteye;
extern crate tiny_http;

mod config;
mod counters;
mod meters;
mod histograms;
mod heatmaps;
mod receiver;
mod sample;
mod sender;

pub use config::Config;
pub use receiver::{Interest, Receiver, Percentile};
pub use sender::Sender;
pub use sample::Sample;
pub use meters::Meters;

pub use clocksource::Clocksource;