Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/aienux/blob/main/vendor/log/benches/value.rs # aienux Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `aienux / vendor / log / benches / value.rs` 27 lines ยท 488 bytes Raw Blame History 1 #![cfg(feature = "kv")] 2 #![feature(test)] 3 4 use log::kv::Value; 5 6 #[bench] 7 fn u8_to_value(b: &mut test::Bencher) { 8 b.iter(|| Value::from(1u8)); 9 } 10 11 #[bench] 12 fn u8_to_value_debug(b: &mut test::Bencher) { 13 b.iter(|| Value::from_debug(&1u8)); 14 } 15 16 #[bench] 17 fn str_to_value_debug(b: &mut test::Bencher) { 18 b.iter(|| Value::from_debug(&"a string")); 19 } 20 21 #[bench] 22 fn custom_to_value_debug(b: &mut test::Bencher) { 23 #[derive(Debug)] 24 struct A; 25 26 b.iter(|| Value::from_debug(&A)); 27 }