Sha256: b613ff353d3cf0ef8cb98e4ca461ea929b8ba553fe299f2eb2942d77a5b1b6a0

Contents?: true

Size: 488 Bytes

Versions: 8

Compression:

Stored size: 488 Bytes

Contents

#![cfg(feature = "kv")]
#![feature(test)]

use log::kv::Value;

#[bench]
fn u8_to_value(b: &mut test::Bencher) {
    b.iter(|| Value::from(1u8));
}

#[bench]
fn u8_to_value_debug(b: &mut test::Bencher) {
    b.iter(|| Value::from_debug(&1u8));
}

#[bench]
fn str_to_value_debug(b: &mut test::Bencher) {
    b.iter(|| Value::from_debug(&"a string"));
}

#[bench]
fn custom_to_value_debug(b: &mut test::Bencher) {
    #[derive(Debug)]
    struct A;

    b.iter(|| Value::from_debug(&A));
}

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
wasmtime-29.0.0 ./ext/cargo-vendor/log-0.4.25/benches/value.rs
wasmtime-28.0.0 ./ext/cargo-vendor/log-0.4.22/benches/value.rs
wasmtime-27.0.0 ./ext/cargo-vendor/log-0.4.22/benches/value.rs
wasmtime-26.0.0 ./ext/cargo-vendor/log-0.4.22/benches/value.rs
wasmtime-25.0.2 ./ext/cargo-vendor/log-0.4.22/benches/value.rs
wasmtime-25.0.1 ./ext/cargo-vendor/log-0.4.22/benches/value.rs
wasmtime-25.0.0 ./ext/cargo-vendor/log-0.4.22/benches/value.rs
wasmtime-24.0.0 ./ext/cargo-vendor/log-0.4.22/benches/value.rs