Skip to content

test_jump_benchmark()

Documentation for tests/benchmark/compute/instruction/test_control_flow.py::test_jump_benchmark@7b8124a7.

Generate fixtures for these test cases for Osaka with:

fill -v tests/benchmark/compute/instruction/test_control_flow.py::test_jump_benchmark --gas-benchmark-values 1

Benchmark JUMP instruction with different dest.

Source code in tests/benchmark/compute/instruction/test_control_flow.py
65
66
67
68
69
70
71
72
73
74
75
@pytest.mark.repricing
def test_jump_benchmark(
    benchmark_test: BenchmarkTestFiller,
) -> None:
    """Benchmark JUMP instruction with different dest."""
    benchmark_test(
        target_opcode=Op.JUMP,
        code_generator=JumpLoopGenerator(
            attack_block=Op.JUMP(Op.ADD(Op.PC, 3)) + Op.JUMPDEST
        ),
    )

Parametrized Test Cases

This test generates 1 parametrized test case across 2 forks.