ethereum / ethereum/execution-specs
Mark Tests Requiring Opcode Counting
- Dominant language
- Python
- Stars
- 1.2k
- Forks
- 505
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 106
Description
> Regarding this comment, we are currently counting opcodes every single time, but we could improve this by doing so only for tests that are marked to require it.
>
> We could mark the tests that need this information with a new marker (`pytest.mark.count_opcodes` or similar). Perhaps we can set it at a folder level, e.g. for all tests in `tests/benchmarking`.
> ```python
> if request.node.get_closest_marker("count_opcodes"):
> session_t8n.reset_opcode_count()
> else:
> session_t8n.remove_opcode_count()
> ```
> or similar.
_Originally posted by @marioevz in [#2084](https://github.com/ethereum/execution-specs/pull/2084/changes#r2741787215)_
Contributor guide
Assessment
This issue has not been assessed yet.