diff options
| author | Kamen Mladenov <kamen@syndamia.com> | 2025-05-05 11:02:41 +0300 |
|---|---|---|
| committer | Kamen Mladenov <kamen@syndamia.com> | 2025-05-05 11:07:41 +0300 |
| commit | 35ee63c12e5e50ff5fb5266c9c3bece8f6d52f2b (patch) | |
| tree | 5e1e229bd1d1840900f6d679ba952863641e487e | |
| parent | b75f2fbb44ea346f1ff23ebd9aeab549f54b957b (diff) | |
| download | zkVMs-benchmarks-35ee63c12e5e50ff5fb5266c9c3bece8f6d52f2b.tar zkVMs-benchmarks-35ee63c12e5e50ff5fb5266c9c3bece8f6d52f2b.tar.gz zkVMs-benchmarks-35ee63c12e5e50ff5fb5266c9c3bece8f6d52f2b.zip | |
feat(zkvms_host_io): Rename argument and metrics output "repeats" to "runs"
| -rw-r--r-- | zkvms_host_io/input_macros/src/lib.rs | 2 | ||||
| -rw-r--r-- | zkvms_host_io/src/lib.rs | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/zkvms_host_io/input_macros/src/lib.rs b/zkvms_host_io/input_macros/src/lib.rs index 229d4e4..656eaf8 100644 --- a/zkvms_host_io/input_macros/src/lib.rs +++ b/zkvms_host_io/input_macros/src/lib.rs @@ -176,7 +176,7 @@ pub fn benchmarkable(item: TokenStream) -> TokenStream { let mut starts = Vec::new(); let mut ends = Vec::new(); - for i in 1..=run_info.repeats {{ + for i in 1..=run_info.runs {{ if run_info.benchmarking {{ starts.push(Instant::now()); }} diff --git a/zkvms_host_io/src/lib.rs b/zkvms_host_io/src/lib.rs index 584a883..0abfc80 100644 --- a/zkvms_host_io/src/lib.rs +++ b/zkvms_host_io/src/lib.rs @@ -72,7 +72,7 @@ pub enum RunType { pub struct RunWith { pub run_type: RunType, pub benchmarking: bool, - pub repeats: usize, + pub runs: usize, pub millis: bool, pub output_file: Option<String>, pub append: bool, @@ -141,7 +141,7 @@ pub fn read_args() -> RunWith { RunWith { run_type: cli.run_type, benchmarking: cli.benchmark, - repeats: cli.repeat.unwrap_or(1), + runs: cli.repeat.unwrap_or(1), millis: cli.millis, output_file: cli.metrics_output, append: cli.append, @@ -188,7 +188,7 @@ pub fn emit_benchmark_results(run_info: RunWith, starts: Vec<Instant>, ends: Vec let duration = *ends.last().unwrap() - *starts.first().unwrap(); run["timeStarted"] = (now - duration).to_string().into(); - run["repeats"] = run_info.repeats.into(); + run["runs"] = run_info.runs.into(); run["totalDuration"] = duration.as_secs_f32().into(); let durations = starts |
