Skip to content
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

Optionally include application source with profiles #67

Open
syamajala opened this issue Oct 13, 2024 · 1 comment
Open

Optionally include application source with profiles #67

syamajala opened this issue Oct 13, 2024 · 1 comment

Comments

@syamajala
Copy link
Contributor

It would be nice if we had a way to optionally include application source with profiles.

Maybe when generating an archive profile you can optionally pass as many --source-dir arguments as you want to paths of source. Then when you click on a box and you get the popup with the provenance you can have a go to source button and a frame that popups at the bottom with tabs showing you the actual application source.

This would be useful for being able to share profiles without having to commit code changes to git when you are just testing things out.

If we include application source in profiles we should encrypt it and the first time you click on this go to source button it asks for a password that you can supply when generating the profile so that the source is not publicly viewable by anyone.

Additionally if we could tie this source code view back to the profile that would be cool. Maybe highlight hotspots in the source view, give us statistics about the amount of overall time being spent on certain lines in the profile, show me which lines of code are allocating large instances? Or clicking on a line of code highlights the boxes, sort of as another way to do search by provenance?

@syamajala
Copy link
Contributor Author

I did not realize the provenance string was the full path to the code so we could just use that instead of --source-dir arguments. Maybe just make a single --include-source which flips this on.

@elliottslaughter egui has a textedit widget:
https://docs.rs/egui/latest/egui/widgets/text_edit/struct.TextEdit.html#method.multiline

Heres a solution for showing line numbers:
emilk/egui#1534 (comment)

There is also this library if you want to make the text fancy:
https://github.com/trishume/syntect

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant