Skip to content

Commit

Permalink
Fix rustfmt complaints in stylus_benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
diegoximenes committed Dec 13, 2024
1 parent 26a7893 commit 0c48cab
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions arbitrator/tools/stylus_benchmark/src/benchmark.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,10 @@ pub fn benchmark(wat_path: PathBuf) -> eyre::Result<()> {
let (duration_run, ink_spent_run) = run(compiled_module.clone());
durations.push(duration_run);
ink_spent = ink_spent_run;
println!("duration: {:?}, ink_spent: {:?}", duration_run, ink_spent_run);
println!(
"duration: {:?}, ink_spent: {:?}",
duration_run, ink_spent_run
);
}

// discard top and bottom runs
Expand All @@ -107,7 +110,10 @@ pub fn benchmark(wat_path: PathBuf) -> eyre::Result<()> {
let avg_duration = durations.iter().sum::<Duration>() / (r - l) as u32;
let avg_ink_spent_per_micro_second = ink_spent.0 / avg_duration.as_micros() as u64;
println!("After discarding top and bottom runs: ");
println!("avg_duration: {:?}, avg_ink_spent_per_micro_second: {:?}", avg_duration, avg_ink_spent_per_micro_second);
println!(
"avg_duration: {:?}, avg_ink_spent_per_micro_second: {:?}",
avg_duration, avg_ink_spent_per_micro_second
);

Ok(())
}

0 comments on commit 0c48cab

Please sign in to comment.