Skip to content
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

feat(cheatcodes): add vm.startGasRecording + vm.stopGasRecording #7900

Closed
holic opened this issue May 9, 2024 · 0 comments · Fixed by #8952
Closed

feat(cheatcodes): add vm.startGasRecording + vm.stopGasRecording #7900

holic opened this issue May 9, 2024 · 0 comments · Fixed by #8952
Labels
A-cheatcodes Area: cheatcodes T-feature Type: feature
Milestone

Comments

@holic
Copy link

holic commented May 9, 2024

Following the lastCallGas addition here: https://github.com/foundry-rs/forge-std/releases/tag/v1.8.2

I'd love to see some way to startGasRecording and stopGasRecording (similar to logs, state diff/mapping recordings) where we can record and retrieve a list of Gas[] to iterate over.

This would give us much finer control (and I assume accuracy) over the gas measuring strategy we use here:
https://github.com/latticexyz/mud/blob/main/packages/gas-report/README.md
https://github.com/latticexyz/mud/blob/main/packages/gas-report/src/GasReporter.sol

@mds1 mds1 transferred this issue from foundry-rs/forge-std May 9, 2024
@zerosnacks zerosnacks changed the title ability to start/stop recording gas for calls feat(cheatcodes): add vm.startGasRecording + vm.stopGasRecording Jul 15, 2024
@zerosnacks zerosnacks added T-feature Type: feature A-cheatcodes Area: cheatcodes labels Jul 15, 2024
@zerosnacks zerosnacks added this to the v1.0.0 milestone Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cheatcodes Area: cheatcodes T-feature Type: feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants