use std::time::Duration;
#[derive(Debug, Clone)]
pub struct BenchmarkConfig {
pub warmup_iterations: usize,
pub warmup_time: Duration,
pub measurement_time: Duration,
pub sample_size: usize,
}
impl Default for BenchmarkConfig {
fn default() -> Self {
Self {
warmup_iterations: 100,
warmup_time: Duration::from_secs(3),
measurement_time: Duration::from_secs(5),
sample_size: 100,
}
}
}
impl BenchmarkConfig {
pub fn quick() -> Self {
Self {
warmup_iterations: 10,
warmup_time: Duration::from_secs(1),
measurement_time: Duration::from_secs(2),
sample_size: 50,
}
}
pub fn thorough() -> Self {
Self {
warmup_iterations: 500,
warmup_time: Duration::from_secs(10),
measurement_time: Duration::from_secs(30),
sample_size: 200,
}
}
}
pub const PAYLOAD_SIZES: &[usize] = &[64, 256, 1024, 4096, 16384];
pub const WIRE_PAYLOAD_SIZES: &[usize] = &[64, 256, 1024];
pub const EVENT_COUNTS: &[usize] = &[10, 100, 1000];