nm/
data_types.rs

1use std::borrow::Cow;
2
3/// Any value in this range is a valid magnitude of an event.
4///
5/// We use integers because they are the fastest data type - floating point math is too slow
6/// for high-frequency observations.
7///
8/// If you are measuring fractional data, scale it up to be representable as integers.
9/// For example, instead of counting seconds, count milliseconds or nanoseconds.
10pub type Magnitude = i64;
11
12/// The name of an event, used for display and keying purposes.
13///
14/// Typically event names are `&'static str` but for rare cases when the exact
15/// set of events is not known in advance, we also support owned strings via `Cow`.
16pub type EventName = Cow<'static, str>;