foundry
foundry copied to clipboard
Support for Flamegraph
Motivation
This PR closes #776. Old PR #8315.
Solution
The current implementation modifies existing logic in test subcommand and evm/traces crate.
It adds a flamegraph
flag to the test subcommand. The interface is similar to the debug
flag. A pattern is to be provided to the flamegraph
flag and additional match-contract
or match-path
maybe used. Finally it is required that just a single test case must be run.
Example:
forge test --flamegraph test_hash_1_a_sol --decode-internal
This will execute the test_hash_1_a_sol
test and generate a flamegraph.svg
file in the project root.