-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: restore instruction count functionality (#3081)
Brings back instruction counts that show that bytecode has changed rather than VM performance. They were previously disabled because vm2 didn't support tracers.
- Loading branch information
Showing
7 changed files
with
71 additions
and
31 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,16 @@ | ||
//! Runs all benchmarks and prints out the number of zkEVM opcodes each one executed. | ||
use vm_benchmark::{BenchmarkingVm, BYTECODES}; | ||
use vm_benchmark::{BenchmarkingVmFactory, Fast, Legacy, BYTECODES}; | ||
|
||
fn main() { | ||
for bytecode in BYTECODES { | ||
let tx = bytecode.deploy_tx(); | ||
let name = bytecode.name; | ||
println!("{name} {}", BenchmarkingVm::new().instruction_count(&tx)); | ||
println!("{name} {}", Fast::<()>::count_instructions(&tx)); | ||
println!( | ||
"{} {}", | ||
name.to_string() + "_legacy", | ||
Legacy::count_instructions(&tx) | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters