use tiny_log::*;
#[derive(Debug)]
struct Berry {
x: u32,
greg: &'static str,
billy: u64
}
#[inline(never)]
fn test2(cheese: &str, x: u32, b:u64) {
info!("Nice to have your", a=32, b= 32);
info!(cheese, x,b, wow="nice hair", buts= Berry{
x:32,
greg:"asdf",
billy:32
});
info!(dogg=32, x,b, wow="nice hair");
}
#[inline(never)]
fn test(cheese: &str, x: u32, b:u64) {
info!("Nice to have your", a=32, b= 32);
info!(cheese, x,b, wow="nice hair");
info!(dogg=32, x,b, wow="nice hair");
}
fn main() {
let mut v = Berry {
x: 32,
greg: "Nice to meat your",
billy: 382
};
v.x += 32;
v.greg= "asdfsd";
v.billy = 33;
let _guard = init_directory_logger("/tmp/.out1");
let now = std::time::Instant::now();
for _ in 0..100 {
test("asdf", 32,555);
test("32", 23, 99);
test("32xxxxxxxxx\"xxxxxx\"xxxxxxxxxx ", 23,99);
test2("32xxxxx\"xxxxxx\"xxxxxxxxxx ", 23,99);
}
drop(_guard);
eprintln!("{:?}",now.elapsed());
}