pub struct Baseline {
pub name: String,
pub mean_ns: u64,
pub samples: u64,
pub ops_per_sec: f64,
}Expand description
Persisted baseline for a single benchmark.
§Example
use dev_bench::Baseline;
use std::time::Duration;
let b = Baseline {
name: "parse".into(),
mean_ns: Duration::from_nanos(1234).as_nanos() as u64,
samples: 1000,
ops_per_sec: 800_000.0,
};
assert_eq!(b.name, "parse");Fields§
§name: StringStable name of the benchmark.
mean_ns: u64Mean per-iteration duration, in nanoseconds.
samples: u64Number of samples collected.
ops_per_sec: f64Throughput at baseline, in ops/sec.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Baseline
impl<'de> Deserialize<'de> for Baseline
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Baseline
Auto Trait Implementations§
impl Freeze for Baseline
impl RefUnwindSafe for Baseline
impl Send for Baseline
impl Sync for Baseline
impl Unpin for Baseline
impl UnsafeUnpin for Baseline
impl UnwindSafe for Baseline
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more