foundry-rs / foundry

Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.
https://getfoundry.sh
Apache License 2.0
8.34k stars 1.77k forks source link

feat(`--gas-report`): add option to include tests #9232

Closed grandizzy closed 3 weeks ago

grandizzy commented 3 weeks ago

Motivation

Closes #6129 https://github.com/foundry-rs/foundry/issues/6129#issuecomment-1953282867 add gas_reports_include_tests = true config to include tests in gas report

Solution

grandizzy commented 3 weeks ago

Reasonable change, for simplicity I think include_tests is OK but we likely want to document that the gas report will include all of the following:

was thinking include_tests more of a include test contracts rather than functions (as at the end they're all grouped per contract in report). Can detail this in book when updated with new option, would this work?