Add EVM execution microbenchmarks via go test -bench#2901
Draft
Add EVM execution microbenchmarks via go test -bench#2901
Conversation
Widen SetupWithSc and related test wrapper functions to accept testing.TB instead of *testing.T so benchmarks can use the SC code path. Add table-driven EVM benchmarks covering non-conflicting, conflicting, and mixed transfer workloads at various scales (100-5000 txs) with OCC/sequential variants. Each benchmark reports txns/op, tps, gas/op, gas/sec, and ns/tx. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2901 +/- ##
==========================================
+ Coverage 57.16% 57.25% +0.09%
==========================================
Files 2091 2093 +2
Lines 171179 171729 +550
==========================================
+ Hits 97853 98324 +471
- Misses 64616 64640 +24
- Partials 8710 8765 +55
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SetupWithSc,NewTestWrapperWithSc,NewGigaTestWrapper, andNewGigaTestWrapperWithRegularStoreto accepttesting.TBinstead of*testing.T, enabling benchmarks to use the SC code pathocc_tests/evm_benchmark_test.gocovering non-conflicting, conflicting, and mixed transfer workloads at 100-5000 tx scalestxns/op,tps,gas/op,gas/sec,ns/txInitial Results (
benchtime=3s)Non-Conflicting EVM Transfers
Conflicting EVM Transfers
Mixed (50/50 conflicting + non-conflicting)
Key Observations
Usage
Test plan
go test -bench=BenchmarkEVM -benchtime=1x -count=1 ./occ_tests/— all benchmarks run without errorgo test ./occ_tests/ -run TestParallelTransactionsEvmTransfer— existing OCC tests still passgo vet ./occ_tests/— no errorsgofmt -s -l app/test_helpers.go occ_tests/evm_benchmark_test.go— no output🤖 Generated with Claude Code