use anyhow::Result; mod kitty_image_flood; mod pty_to_pixel; mod vtebench; pub(crate) struct WorkloadResult { pub name: String, /// Ordered so report output is stable. pub metrics: Vec<(String, f64)>, } pub(crate) trait Workload: Send + Sync { fn name(&self) -> &'static str; fn description(&self) -> &'static str; fn run(&self) -> Result; } pub(crate) struct Registry(Vec>); impl Registry { pub(crate) fn default_set() -> Self { Self(vec![ Box::new(vtebench::Cat), Box::new(vtebench::Scrolling), Box::new(vtebench::Unicode), Box::new(kitty_image_flood::KittyImageFlood), Box::new(pty_to_pixel::PtyToPixel), ]) } pub(crate) fn iter(&self) -> impl Iterator { self.0.iter().map(AsRef::as_ref) } }