Skip to content

Commit

Permalink
rm bench
Browse files Browse the repository at this point in the history
  • Loading branch information
rakita committed Feb 6, 2025
1 parent 1d6037f commit b4d543b
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions bins/revme/src/cmd/bench/transfer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use revm::{
primitives::{TxKind, U256},
Context, ExecuteEvm, MainBuilder, MainContext,
};
use std::time::{Duration, Instant};
use std::time::Instant;

pub fn run() {
let time = Instant::now();
Expand All @@ -23,10 +23,7 @@ pub fn run() {
let _ = evm.transact_previous();
println!("First run: {:?}", time.elapsed());

// Microbenchmark
let bench_options = microbench::Options::default().time(Duration::from_secs(1));

microbench::bench(&bench_options, "Run bytecode", || {
let _ = evm.transact_previous().unwrap();
});
let time = Instant::now();
let _ = evm.transact_previous();
println!("Second run: {:?}", time.elapsed());
}

0 comments on commit b4d543b

Please sign in to comment.