-
Notifications
You must be signed in to change notification settings - Fork 20.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd/evm: Add --bench flag for benchmarking #20330
Conversation
A suggestion that would make this a lot better. Instead of simply running once and measuring it (unstable), lets use Go's built in benchmark runner ( |
Yes, I was going this direction. I was considering two options:
|
bf06ff5
to
644d5fa
Compare
@karalabe, this is ready now for review. |
The --bench flag uses the testing.B to execute the EVM bytecode many times and get the average exeuction time out of it.
644d5fa
to
aa6d963
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This generally LGTM, but could you provide (on the PR description) some sample/example output from running it -- so we get a feel for how to use it and how the output looks?
The output is unchanged, just the With
Without:
|
Oh, thanks :) |
The --bench flag uses the testing.B to execute the EVM bytecode many times and get the average exeuction time out of it.
The --bench flag uses the testing.B to execute the EVM bytecode many times and get the average exeuction time out of it.