foundry icon indicating copy to clipboard operation
foundry copied to clipboard

ability to start/stop recording gas for calls

Open frolic opened this issue 9 months ago • 0 comments

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

frolic avatar May 09 '24 14:05 frolic