metrics 0.21.1

A lightweight metrics facade.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//! This example is purely for development.
use metrics::{Key, Label, SharedString};
use std::borrow::Cow;

fn main() {
    println!("Key: {} bytes", std::mem::size_of::<Key>());
    println!("Label: {} bytes", std::mem::size_of::<Label>());
    println!("Cow<'static, [Label]>: {} bytes", std::mem::size_of::<Cow<'static, [Label]>>());
    println!("Vec<SharedString>: {} bytes", std::mem::size_of::<Vec<SharedString>>());
    println!(
        "[Option<SharedString>; 2]: {} bytes",
        std::mem::size_of::<[Option<SharedString>; 2]>()
    );
}