-
Notifications
You must be signed in to change notification settings - Fork 2k
feat(forge
): add support for flamegraph
#7761
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
Comments
Hi @zemse! Great work on this project, it would be great if we could get this into foundry natively :) Do you have time for kicking off PR with this at the moment? We'd be happy to give you pointers and help with integrating everything into existing code |
Sure I'll try making a PR over the weekend :) |
hey @zemse I've been playing around with internal fns tracking in #8222 lately in context of displaying them in traces it is based on using the I believe it can be reused for flamegraphs as well so feel free to use it in your PR if you find it feasible to integrate |
hey @zemse! how's it going with the PR? do you need any help? |
Sorry last weekend I was not in best health, couldn't start this. I looked at your PR and it made sense. Aiming to make up something this weekend! |
forge
): add support for flamegraph
Closed by #8640 |
Component
Forge
Describe the feature you would like
I was recently interested in flamegraphs, had to hack something locally and then over the weekend packaged it as a foundry plugin: forge-flamegraph. Here is a 4-minute video demo.
The features in brief:
--open
flag which simply opens the SVG in the browser post-generation.--merge
flag which is useful when a function is called multiple times.After asking for some feedback, I've learned that there is friction because of typical solidity devs don't have Cargo installed as well as current flow of installation also requires users to build the plugin. I've created #7760 to discuss potential remedies for this problem. The reason I went forward with a plugin instead of direct subcommand PR because I was mainly interested in the "debug trace flamegraph" which is very hacky and does not always work well, so I was not sure if having such experimental code in foundry codebase is fine.
But if this is helpful, I am interested to clean up the code and PR, so that these features are more accessible to people!
Additional context
No response
The text was updated successfully, but these errors were encountered: