-
Notifications
You must be signed in to change notification settings - Fork 404
feat(test-benchmark): add labels to benchmark pre-alloc groups and fix extract config #1901
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
base: forks/amsterdam
Are you sure you want to change the base?
feat(test-benchmark): add labels to benchmark pre-alloc groups and fix extract config #1901
Conversation
…um#1842) Co-authored-by: spencer <spencer.tb@ethereum.org>
| genesis: FixtureHeader | ||
| alloc: Alloc | ||
| chain_id: int = 1 | ||
| fork: Fork |
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.
extract_config fix.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## forks/osaka #1901 +/- ##
============================================
Coverage 83.87% 83.87%
============================================
Files 402 402
Lines 25101 25101
Branches 2285 2285
============================================
Hits 21053 21053
Misses 3609 3609
Partials 439 439
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
marioevz
left a comment
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.
I feel like the label should have not been included in the same PR as this fix because it needs more thinking it through.
Plus it is technically a breaking change, because benchmark test runners will have to be updated to be prepared for these file name changes.
| # Generate a label based on test count and test IDs | ||
| # Only label benchmark tests | ||
| label = None | ||
| if self.test_ids and "tests/benchmark/" in self.test_ids[0]: |
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 seems too brittle, we could collect a test object that contains more metadata instead of trying to infer information that we already lost.
| if "::" in test_id: | ||
| test_name = test_id.split("::")[-1].split("[")[0] | ||
| label = f"single_test_{test_name}" | ||
| elif len(self.test_ids) > 100: |
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 hard-coded number heuristic is prone to error, as the number of tests grow, we will likely hit this at some point when we have more grouped tests.
Perhaps main should be equal to all tests that do not modify the env?
Also, if we plan to make benchmark fixtures for other forks, we are going to have a conflict, so perhaps we should include the name of the fork in the label too.
|
We can remove the fix from this PR and merge #1947, and only leave this PR to discuss the labeling. |
🗒️ Description
Main Fix
This PR fixes the
extract_configbug where fork was accessed from genesis instead ofPreAllocGroup:https://github.com/ethereum/execution-specs/actions/runs/20071991321/job/57576383289
Extra Changes
Adds automatic labeling to benchmark test pre-allocation groups to make it easy to identify the main group vs separated test groups. This consideration comes from the 6 pre-allocations groups now contained in benchmark releases, due to the seperate pre-alloc groups in
test_blockhash:When
fill --generate-all-formatsis run for benchmark tests, pre-alloc groups are now:"label": "main"or"label": "single_test_<name>"0x398fa63f55cfbafc_main.jsoninstead of just0x398fa63f55cfbafc.jsonThis makes it trivial to find the main benchmark pre-alloc group (593 tests) versus the 5 separated
test_blockhashvariants (1 test each).Before:
After:
🔗 Related Issues or PRs
#1799
✅ Checklist
toxchecks to avoid unnecessary CI fails, see also Code Standards and Enabling Pre-commit Checks:uvx tox -e statictype(scope):.