use super::*;
#[derive(Clone, Debug, Getter, New, Serialize)]
#[new(pub(crate))]
pub(crate) struct Report {
#[serde(flatten)]
#[get(pub(crate))]
pub(crate) header: Header,
#[get(pub(crate))]
pub(crate) config: Config,
#[get(pub(crate))]
pub(crate) measurements: Vec<Measurement>,
}
#[derive(Clone, Debug, Getter, New, Serialize)]
#[new(pub(crate))]
pub(crate) struct Header {
#[get(pub(crate), type(copy))]
pub(crate) schema_version: u32,
#[get(pub(crate), type(copy))]
pub(crate) mode: &'static str,
#[serde(flatten)]
#[get(pub(crate))]
pub(crate) environment: Environment,
}
#[derive(Clone, Debug, Getter, New, Serialize)]
#[new(pub(crate))]
pub(crate) struct Environment {
#[get(pub(crate))]
pub(crate) source_root: String,
#[get(pub(crate))]
pub(crate) os: String,
#[get(pub(crate))]
pub(crate) architecture: String,
#[get(pub(crate))]
pub(crate) logical_cpus: Option<usize>,
#[get(pub(crate))]
pub(crate) compiler: String,
#[get(pub(crate), type(copy))]
pub(crate) unix_seconds: u64,
#[get(pub(crate))]
pub(crate) limitations: String,
}
#[derive(Clone, Debug, Getter, New, Serialize)]
#[new(pub(crate))]
pub(crate) struct Measurement {
#[get(pub(crate), type(copy))]
pub(crate) suite: Suite,
#[get(pub(crate))]
pub(crate) initialization_ns: Option<u64>,
#[get(pub(crate))]
pub(crate) initialization_allocations: Option<AllocationDelta>,
#[get(pub(crate))]
pub(crate) warmup_allocations: Option<AllocationDelta>,
#[get(pub(crate))]
pub(crate) retained_after_drop_bytes: Option<i64>,
#[get(pub(crate))]
pub(crate) samples: Vec<Sample>,
}
#[derive(Clone, Copy, Debug, Getter, New, Serialize)]
#[new(pub(crate))]
pub(crate) struct Sample {
#[get(pub(crate), type(copy))]
pub(crate) round: usize,
#[get(pub(crate), type(copy))]
pub(crate) ticks: usize,
#[serde(flatten)]
#[get(pub(crate))]
pub(crate) timings: Timings,
#[get(pub(crate))]
pub(crate) allocations: Option<AllocationDelta>,
#[get(pub(crate), type(copy))]
pub(crate) work: Work,
}
#[derive(Clone, Copy, Debug, Default, Getter, New, Serialize)]
#[new(pub(crate))]
pub(crate) struct Timings {
#[get(pub(crate))]
pub(crate) elapsed_ns: Option<u64>,
#[get(pub(crate))]
pub(crate) p50_ns: Option<u64>,
#[get(pub(crate))]
pub(crate) p95_ns: Option<u64>,
#[get(pub(crate))]
pub(crate) p99_ns: Option<u64>,
#[get(pub(crate))]
pub(crate) ticks_per_second: Option<f64>,
}