dummy app for getting the sizes of various types related to keys
This commit is contained in:
parent
e926a6b6c6
commit
d72a744a76
|
@ -0,0 +1,13 @@
|
|||
//! This example is purely for development.
|
||||
use std::borrow::Cow;
|
||||
use metrics::{Key, KeyData, NameParts, Label, SharedString};
|
||||
|
||||
fn main() {
|
||||
println!("KeyData: {} bytes", std::mem::size_of::<KeyData>());
|
||||
println!("Key: {} bytes", std::mem::size_of::<Key>());
|
||||
println!("NameParts: {} bytes", std::mem::size_of::<NameParts>());
|
||||
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]>());
|
||||
}
|
Loading…
Reference in New Issue