Skip to content

ci: Benchmark the execution spec tests on CodSpeed - #1730

Merged
chfast merged 2 commits into
masterfrom
ci/eest-benchmarks
Sep 24, 2026
Merged

chfast merged 2 commits into
masterfrom
ci/eest-benchmarks

Conversation

@chfast

@chfast chfast commented Sep 21, 2026 •

Copy link
Copy Markdown
Member

The benchmarks tracked so far execute a single contract against a mocked host, which leaves the state, the host calls and the transaction handling unmeasured. This reports the execution of every blockchain test evmone test runs to CodSpeed as a benchmark, and adds the worst-case blocks of the execution spec tests to the workflow, run as the tests they are: each checks its post state and is measured on the way.

The reporting is codspeed-cpp's own, compiled in only for a CodSpeed build, and it reports nothing unless the runner is attached, so the one binary stays the ordinary test runner. The test driver brackets the test execution with codspeed-cpp's measurement calls.

What is measured

benchmark@v0.0.7 fills every benchmark for seven block sizes; the smallest is taken, which covers all of them in a few minutes under the simulator where the largest would need most of an hour. Only the execution of a test is measured, not the loading of its fixture: the state transition, the state root and the post-state check.

CodSpeed rejects too many benchmarks in a single upload (750 were), so the fixtures are split into jobs. The two suites sweeping what something else already covers give up their sweep (modexp, which the precompiles benchmark sweeps already, and log_benchmark, whose opcodes log.json sweeps).

Notes for review

  • The name of a benchmark is the fixture's own, which is already the <file>::<test>[<params>] a benchmark is identified by. The file belongs to the repository the fixture was filled from, so CodSpeed cannot link it.
  • The integration is registered by codspeed-cpp itself. CodSpeed generated no flame graphs for the same measurements reported under a name of our own.
  • Every job of the matrix runs its command in the one CodSpeed step; the existing evmone-bench and evmone-precompiles-bench run together in the evmone job, which fails if either does.
  • A fork bump renames every benchmark, as the fork is part of the fixture's name, and the series starts over. The pin is bumped deliberately for that reason.

🤖 Generated with Claude Code

@codspeed

codspeed Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Merging this PR will improve performance by 2.71%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 1 improved benchmark
✅ 128 untouched benchmarks
🆕 770 new benchmarks

Performance Changes

Benchmark BASE HEAD Efficiency
⚡ baseline/analyse/main/sha1_shifts 11.5 µs 11.2 µs +2.71%
🆕 test_arithmetic[fork_Osaka-blockchain_test-opcode_ADD--benchmark-gas-value_1M] N/A 11.8 ms N/A
🆕 test_arithmetic[fork_Osaka-blockchain_test-opcode_ADDMOD--benchmark-gas-value_1M] N/A 8.1 ms N/A
🆕 test_arithmetic[fork_Osaka-blockchain_test-opcode_DIV-0-benchmark-gas-value_1M] N/A 49.1 ms N/A
🆕 test_arithmetic[fork_Osaka-blockchain_test-opcode_DIV-1-benchmark-gas-value_1M] N/A 48.1 ms N/A
🆕 test_arithmetic[fork_Osaka-blockchain_test-opcode_EXP--benchmark-gas-value_1M] N/A 26.2 ms N/A
🆕 test_arithmetic[fork_Osaka-blockchain_test-opcode_MOD--benchmark-gas-value_1M] N/A 8.9 ms N/A
🆕 test_arithmetic[fork_Osaka-blockchain_test-opcode_MUL--benchmark-gas-value_1M] N/A 16 ms N/A
🆕 test_arithmetic[fork_Osaka-blockchain_test-opcode_MULMOD--benchmark-gas-value_1M] N/A 8.9 ms N/A
🆕 test_arithmetic[fork_Osaka-blockchain_test-opcode_SDIV-0-benchmark-gas-value_1M] N/A 55.2 ms N/A
🆕 test_arithmetic[fork_Osaka-blockchain_test-opcode_SDIV-1-benchmark-gas-value_1M] N/A 55.3 ms N/A
🆕 test_arithmetic[fork_Osaka-blockchain_test-opcode_SIGNEXTEND--benchmark-gas-value_1M] N/A 10.3 ms N/A
🆕 test_arithmetic[fork_Osaka-blockchain_test-opcode_SMOD--benchmark-gas-value_1M] N/A 9.8 ms N/A
🆕 test_arithmetic[fork_Osaka-blockchain_test-opcode_SUB--benchmark-gas-value_1M] N/A 11.8 ms N/A
🆕 test_mod_arithmetic[fork_Osaka-blockchain_test-opcode_ADDMOD-mod_bits_127-benchmark-gas-value_1M] N/A 31.3 ms N/A
🆕 test_mod_arithmetic[fork_Osaka-blockchain_test-opcode_ADDMOD-mod_bits_191-benchmark-gas-value_1M] N/A 37.9 ms N/A
🆕 test_mod_arithmetic[fork_Osaka-blockchain_test-opcode_ADDMOD-mod_bits_255-benchmark-gas-value_1M] N/A 34.3 ms N/A
🆕 test_mod_arithmetic[fork_Osaka-blockchain_test-opcode_ADDMOD-mod_bits_63-benchmark-gas-value_1M] N/A 23.4 ms N/A
🆕 test_mod_arithmetic[fork_Osaka-blockchain_test-opcode_MULMOD-mod_bits_127-benchmark-gas-value_1M] N/A 51.3 ms N/A
🆕 test_mod_arithmetic[fork_Osaka-blockchain_test-opcode_MULMOD-mod_bits_191-benchmark-gas-value_1M] N/A 67.9 ms N/A
... ... ... ... ...

ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.

Tip

Curious why performance improved? Comment @codspeedbot explain why performance improved on this PR, or directly use the CodSpeed MCP with your agent.


Comparing ci/eest-benchmarks (43869a5) with master (2a4decd)

Open in CodSpeed

@codecov

codecov Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.98%. Comparing base (2a4decd) to head (43869a5).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1730      +/-   ##
==========================================
+ Coverage   97.89%   97.98%   +0.08%     
==========================================
  Files         183      183              
  Lines       16850    16851       +1     
  Branches     3856     3856              
==========================================
+ Hits        16496    16511      +15     
+ Misses        257      250       -7     
+ Partials       97       90       -7     
Flag Coverage Δ
eest-develop 81.72% <100.00%> (+<0.01%) ⬆️
eest-develop-gmp 25.84% <0.00%> (-0.01%) ⬇️
eest-legacy 17.07% <100.00%> (?)
eest-libsecp256k1 28.04% <0.00%> (-0.01%) ⬇️
eest-stable 81.72% <100.00%> (+<0.01%) ⬆️
evmone-unittests 94.41% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
core 95.94% <ø> (ø)
tooling 94.29% <100.00%> (+0.71%) ⬆️
tests 99.81% <ø> (ø)
Files with missing lines Coverage Δ
test/utils/test_driver.cpp 98.08% <100.00%> (+0.01%) ⬆️

... and 4 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@chfast
chfast force-pushed the ci/eest-benchmarks branch 2 times, most recently from c41ba92 to eaf6642 Compare September 23, 2026 21:05
The benchmarks tracked so far execute a single contract against a
mocked host, which leaves the state, the host calls and the transaction
handling unmeasured. Report the execution of each blockchain test
`evmone test` runs as a benchmark, named by its fixture: that name
is already the "<file>::<test>[<params>]" a benchmark is identified
by. The reporting is done by codspeed-cpp, the library of the C++
benchmarks, whose integration CodSpeed knows and generates the flame
graphs for. It is linked in only for a CodSpeed build and reports
nothing unless the runner is attached, so the one binary stays the
ordinary test runner.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Unresolved benchmark-boundary, naming, and fixture-integrity issues must be addressed.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 2 Medium severity

Open (2)
What changed in this PR

Adds CodSpeed benchmarking for blockchain execution-spec tests.

Changes:

  • Instruments blockchain fixture execution.
  • Links CodSpeed into test utilities.
  • Adds partitioned fixture benchmark jobs.
File Description
test/​utils/​test_driver.cpp Adds measurement hooks; measurement cleanup on exceptions and file-qualified benchmark names need correction.
test/​CMakeLists.txt Links CodSpeed instrumentation into test utilities.
.github/​workflows/​codspeed.yml Adds benchmark matrix jobs; the downloaded fixture archive requires SHA-256 verification.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/codspeed.yml
Comment thread test/utils/test_driver.cpp
Run the worst-case blocks of the execution spec tests as the tests they
are: each checks its post state and is measured on the way. Every one is
filled for seven block sizes and the smallest is taken, which covers all
the benchmarks in a few minutes under the simulator where the largest
would need most of an hour. CodSpeed rejects too many benchmarks in a
single upload, so the fixtures are split into jobs, and two sweeps
measured elsewhere are left out.
@chfast chfast changed the title Benchmark the execution spec tests on CodSpeed ci: Benchmark the execution spec tests on CodSpeed Sep 24, 2026
@chfast
chfast requested a lite review from Copilot September 24, 2026 09:55

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Unresolved findings affect CodSpeed linkage, measurement cleanup, benchmark identity, and CI build efficiency.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 2 Medium severity

Open (2)
Resolved since last review (2)

Comment thread test/CMakeLists.txt
Comment thread test/utils/test_driver.cpp
@chfast
chfast merged commit 1671d6d into master Sep 24, 2026
31 checks passed
@chfast
chfast deleted the ci/eest-benchmarks branch September 24, 2026 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants