| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
use anyhow::{Result, bail}; |
| 8 |
|
| 9 |
use super::{Workload, WorkloadResult}; |
| 10 |
|
| 11 |
pub(crate) struct Cat; |
| 12 |
pub(crate) struct Scrolling; |
| 13 |
pub(crate) struct Unicode; |
| 14 |
|
| 15 |
impl Workload for Cat { |
| 16 |
fn name(&self) -> &'static str { |
| 17 |
"vtebench-cat" |
| 18 |
} |
| 19 |
fn description(&self) -> &'static str { |
| 20 |
"vtebench --dat cat: raw byte throughput, hot cell path" |
| 21 |
} |
| 22 |
fn run(&self) -> Result<WorkloadResult> { |
| 23 |
run_vtebench("cat", &["cell_throughput_mb_s", "frame_time_p99_ms"]) |
| 24 |
} |
| 25 |
} |
| 26 |
|
| 27 |
impl Workload for Scrolling { |
| 28 |
fn name(&self) -> &'static str { |
| 29 |
"vtebench-scrolling" |
| 30 |
} |
| 31 |
fn description(&self) -> &'static str { |
| 32 |
"vtebench --dat scrolling: scroll+render frame time" |
| 33 |
} |
| 34 |
fn run(&self) -> Result<WorkloadResult> { |
| 35 |
run_vtebench("scrolling", &["frame_time_p99_ms", "frame_time_p50_ms"]) |
| 36 |
} |
| 37 |
} |
| 38 |
|
| 39 |
impl Workload for Unicode { |
| 40 |
fn name(&self) -> &'static str { |
| 41 |
"vtebench-unicode" |
| 42 |
} |
| 43 |
fn description(&self) -> &'static str { |
| 44 |
"vtebench --dat unicode: grapheme + width fast path" |
| 45 |
} |
| 46 |
fn run(&self) -> Result<WorkloadResult> { |
| 47 |
run_vtebench("unicode", &["cell_throughput_mb_s"]) |
| 48 |
} |
| 49 |
} |
| 50 |
|
| 51 |
fn run_vtebench(_dat: &str, _metrics: &[&str]) -> Result<WorkloadResult> { |
| 52 |
|
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
|
| 59 |
|
| 60 |
|
| 61 |
bail!( |
| 62 |
"vtebench workloads are fw13-only and not yet wired; \ |
| 63 |
see crates/shop-bench/src/workloads/vtebench.rs for the checklist" |
| 64 |
) |
| 65 |
} |
| 66 |
|