-
Notifications
You must be signed in to change notification settings - Fork 373
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
feat: gnovm benchmarking tool #2241
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2241 +/- ##
==========================================
- Coverage 61.10% 60.46% -0.64%
==========================================
Files 564 572 +8
Lines 75355 79491 +4136
==========================================
+ Hits 46045 48066 +2021
- Misses 25945 27822 +1877
- Partials 3365 3603 +238
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
Looks good. Perhaps we could move the transient size
variable so that is defined inside the benchmarking package as an exported variable. Then it can be set and read strictly within benchmarking constant conditional blocks and avoid any unnecessary allocations when benchmarking is not enabled.
What do you think?
benchmarking/Makefile
Outdated
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.
Could this be reorganised to:
gnovm/cmd/gnobench
+gnovm/pkg/gasbench
ORcontribs/gnobecnh
?
I don't want to add another top-level directory.
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.
gnovm/pkg/opsbench
Waiting for updates as per discussions with Ray |
…ive benchmark anymore.
Contributors' checklist...
BREAKING CHANGE: xxx
message was included in the descriptionWe build this tool mainly for the following issues
#1826
#1828
#1281
#1973
We could also use it in the following cases.
#1973
#2222
gnobench
benchmarks the time consumed for each VM CPU OpCode and persistent access to the store, including marshalling and unmarshalling of realm objects.Design consideration
Minimum Overhead and Footprint
Accuracy
It is built on top of @deelawn's design and framework with @jaekwon's input.
#2073
Usage
Simple mode
The benchmark only involves the GnoVM and the persistent store. It benchmarks the bare minimum components, and the results are isolated from other components. We use standardize gno contract to perform the benchmarking.
This mode is the best for benchmarking each major release and/or changes in GnoVM.
Production mode
It benchmarks the node in the production environment with minimum overhead.
We can only benchmark with standardize the contract but also capture the live usage in production environment.
It gives us a complete picture of the node perform.
go build -tags "benchmarkingstorage benchmarkingops" gno.land/cmd/gnoland
Run the node in the production environment. It will dump benchmark data to a benchmark.bin file.
call the realm contracts at
gno.land/r/x/benchmark/opcodes
andgno.land/r/x/benchmark/storage
Stop the server after the benchmarking session is complete.
Run the following command to convert the binary dump:
gnobench -bin path_to_benchmark_bin
Results ( Examples )
The benchmarking results are stored in two files: