Don't count ```console.log()``` gas consumption inside the gas report
Component
Forge
Describe the feature you would like
This is really a minor thing, but, if worth it, it would be cool to exclude the gas consumed by console.log() from the report.
Additional context
No response
+1
My proposal here: https://github.com/foundry-rs/foundry/issues/2056#issuecomment-2237053678 would likely address this issue in a more generalised way by giving you the ability to define a section over which the gas is captured. This doesn't automatically filter out the console.log but I think it makes it possible to be much more precise about what you are measuring.
Hi @0xCaso / @algtm
In https://github.com/foundry-rs/foundry/pull/8952 I've added support for gas snapshots over sections using cheatcodes. Would be great to get feedback on this.
To not include console.log you would simply not include it as part of your section you measure over
Marking as effectively resolved by https://github.com/foundry-rs/foundry/pull/8952