Sha256: 55bd5f795a524f0699b2858eb14cc456abebeb43d50c90d2bfc77cd7856e8050

Contents?: true

Size: 561 Bytes

Versions: 8

Compression:

Stored size: 561 Bytes

Contents

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

extern crate log;
extern crate 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-9.0.1 ./ext/cargo-vendor/log-0.4.17/benches/value.rs
wasmtime-8.0.0 ./ext/cargo-vendor/log-0.4.17/benches/value.rs
wasmtime-7.0.0 ./ext/cargo-vendor/log-0.4.17/benches/value.rs
wasmtime-6.0.1 ./ext/cargo-vendor/log-0.4.17/benches/value.rs
wasmtime-6.0.0 ./ext/cargo-vendor/log-0.4.17/benches/value.rs
wasmtime-5.0.0 ./ext/cargo-vendor/log-0.4.17/benches/value.rs
wasmtime-0.4.1 ./ext/cargo-vendor/log-0.4.17/benches/value.rs
wasmtime-0.4.0 ./ext/cargo-vendor/log-0.4.17/benches/value.rs