Skip to content

Commit bfafa90

Browse files
committed
chore(ci): defer benchmark changes to separate PR
1 parent 5462b34 commit bfafa90

4 files changed

Lines changed: 40 additions & 12 deletions

File tree

.github/configs/feature.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,13 @@ tests:
1111

1212
benchmark:
1313
evm-type: benchmark
14-
fill-params: --fork=Amsterdam --gas-benchmark-values 1,10,30,60,100,150 ./tests/benchmark
14+
fill-params: --fork=Osaka --generate-all-formats --gas-benchmark-values 1,5,10,30,60,100,150 ./tests/benchmark/compute --maxprocesses=30 --dist=worksteal
15+
feature_only: true
16+
17+
benchmark_fast:
18+
evm-type: benchmark
19+
fill-params: --fork=Osaka --generate-all-formats --gas-benchmark-values 100 ./tests/benchmark/compute
20+
feature_only: true
1521

1622
# Shared entry for all `<feat>-devnet` releases; matched by `-devnet` suffix.
1723
devnet:

.github/workflows/benchmark.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,3 +83,18 @@ jobs:
8383

8484
# TODO: Add execute remote tests with --gas-benchmark-values
8585
# TODO: Add execute remote tests with --fixed-opcode-count
86+
87+
build-artifact:
88+
name: Build Benchmark Fixture Artifact
89+
needs: [sanity-checks] # TODO: Add execute remote jobs when implemented
90+
if: github.event_name == 'push'
91+
runs-on: [self-hosted-ghr, size-gigachungus-x64]
92+
timeout-minutes: 720
93+
steps:
94+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
95+
with:
96+
submodules: true
97+
98+
- uses: ./.github/actions/build-fixtures
99+
with:
100+
release_name: benchmark_fast

packages/testing/src/execution_testing/cli/pytest_commands/plugins/filler/tests/test_benchmarking.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ def test_benchmarking_mode_configured_with_option(
193193
)
194194

195195
assert result.ret == 0
196-
assert any("3 tests collected" in line for line in result.outlines)
196+
assert any("6 tests collected" in line for line in result.outlines)
197197
# Check that the test names include the benchmark gas values
198198
assert any("benchmark-gas-value_10M" in line for line in result.outlines)
199199
assert any("benchmark-gas-value_20M" in line for line in result.outlines)
@@ -379,8 +379,8 @@ def test_benchmarking_mode_not_configured_without_option(
379379
)
380380

381381
assert result.ret == 0
382-
# Should generate normal test variants (1) without parametrization
383-
assert any("1 test collected" in line for line in result.outlines)
382+
# Should generate normal test variants (2) without parametrization
383+
assert any("2 tests collected" in line for line in result.outlines)
384384
assert not any(
385385
"benchmark-gas-value_10M" in line for line in result.outlines
386386
)
@@ -523,7 +523,7 @@ def test_repricing_marker_with_kwargs_filters_parametrized_tests(
523523
]
524524

525525
# test_parametrized_with_repricing_kwargs should only have ADD variants
526-
# (the blockchain_test fixture type)
526+
# (multiple test types like blockchain_test and blockchain_test_engine)
527527
kwargs_test_lines = [
528528
line
529529
for line in collected_lines
@@ -863,29 +863,29 @@ def test_fixed_opcode_count_invalid_regex_raises_error() -> None:
863863
@pytest.mark.parametrize(
864864
"config_counts,expected_tests,expected_ids",
865865
[
866-
pytest.param([1], 1, ["opcount_1"], id="single_int"),
866+
pytest.param([1], 2, ["opcount_1"], id="single_int"),
867867
pytest.param(
868868
[1, 2, 3],
869-
3,
869+
6,
870870
["opcount_1", "opcount_2", "opcount_3"],
871871
id="multiple_ints",
872872
),
873-
pytest.param([0.5], 1, ["opcount_0.5"], id="single_float"),
873+
pytest.param([0.5], 2, ["opcount_0.5"], id="single_float"),
874874
pytest.param(
875875
[0.5, 1, 2],
876-
3,
876+
6,
877877
["opcount_0.5", "opcount_1", "opcount_2"],
878878
id="multiple_floats",
879879
),
880880
pytest.param(
881881
[1, 0.5, 2],
882-
3,
882+
6,
883883
["opcount_1", "opcount_0.5", "opcount_2"],
884884
id="mixed_int_float",
885885
),
886886
pytest.param(
887887
[1, 2, 3, 5],
888-
4,
888+
8,
889889
["opcount_1", "opcount_2", "opcount_3", "opcount_5"],
890890
id="four_ints",
891891
),
@@ -943,7 +943,7 @@ def test_fixed_opcode_count_config_file_parametrized(
943943
)
944944

945945
assert result.ret == 0
946-
# Check expected number of tests (1 test type * len(counts))
946+
# Check expected number of tests (2 test types * len(counts))
947947
assert any(f"{expected_tests} passed" in line for line in result.outlines)
948948
# Check opcode count IDs are present
949949
for expected_id in expected_ids:

packages/testing/src/execution_testing/specs/benchmark.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
TransactionPost,
3232
)
3333
from execution_testing.fixtures import (
34+
BlockchainEngineFixture,
3435
BlockchainEngineXFixture,
3536
BlockchainFixture,
3637
FixtureFormat,
@@ -315,6 +316,7 @@ class BenchmarkTest(BaseTest):
315316
Sequence[FixtureFormat | LabeledFixtureFormat]
316317
] = [
317318
BlockchainFixture,
319+
BlockchainEngineFixture,
318320
BlockchainEngineXFixture,
319321
]
320322

@@ -327,6 +329,9 @@ class BenchmarkTest(BaseTest):
327329
]
328330

329331
supported_markers: ClassVar[Dict[str, str]] = {
332+
"blockchain_test_engine_only": (
333+
"Only generate a blockchain test engine fixture"
334+
),
330335
"blockchain_test_only": "Only generate a blockchain test fixture",
331336
"repricing": "Mark test as reference test for gas repricing analysis",
332337
}
@@ -425,6 +430,8 @@ def discard_fixture_format_by_marks(
425430

426431
if "blockchain_test_only" in [m.name for m in markers]:
427432
return fixture_format != BlockchainFixture
433+
if "blockchain_test_engine_only" in [m.name for m in markers]:
434+
return fixture_format != BlockchainEngineFixture
428435
return False
429436

430437
def get_genesis_environment(self) -> Environment:

0 commit comments

Comments
 (0)