use super::*;
#[derive(Clone, Debug, Deserialize, Getter, New, PartialEq, Serialize)]
pub struct BenchMetric {
pub(crate) name: String,
#[get(type(copy))]
pub(crate) iterations: usize,
#[get(type(copy))]
pub(crate) total_micros: u64,
#[get(type(copy))]
pub(crate) ns_per_op: f64,
#[get(type(copy))]
pub(crate) ops_per_sec: f64,
pub(crate) detail: String,
#[get(type(copy))]
#[new(skip)]
#[serde(default)]
pub(crate) alloc_count: u64,
#[get(type(copy))]
#[new(skip)]
#[serde(default)]
pub(crate) bytes_allocated: u64,
#[get(type(copy))]
#[new(skip)]
#[serde(default)]
pub(crate) allocs_per_op: f64,
#[get(type(copy))]
#[new(skip)]
#[serde(default)]
pub(crate) bytes_per_op: f64,
}
#[derive(Clone, Debug, Deserialize, Getter, New, PartialEq, Serialize)]
pub struct BenchReport {
pub(crate) metrics: Vec<BenchMetric>,
}
#[derive(Clone, Copy, Debug)]
pub(crate) struct BenchCase {
pub(crate) name: &'static str,
pub(crate) runner: fn() -> BenchMetric,
}