gh-142927: Show module names instead of file paths in flamegraph#146040
gh-142927: Show module names instead of file paths in flamegraph#146040ivonastojanovic wants to merge 3 commits intopython:mainfrom
Conversation
|
As I am on mobile it is hard to review but is it possible to have an option to keep showing full paths? this may help if we want to open the file in an IDE. Or does this change only affect the flamegraph output? Alternative: show the full path of the selected cell as a footer |
Move module name extraction logic from heatmap_collector to shared module_utils to enable flamegraph to display module names instead of full file paths.
Display module names instead of full file paths (/home/user/project/pkg/mod.py → pkg.mod) in flamegraph for readability.
Users can now switch between module names and file paths using the toggle in the View Mode sidebar. Module names are concise, while file paths help locate the exact source file, both are useful depending on the debugging context.
a3d38ad to
b5eeefb
Compare
@picnixz That’s a great idea. I’ve added a toggle that lets users switch between full paths and module names. Toggling it updates both the flamegraph frames and the hover tooltips. This change only affects the flamegraph output. Let me know what you think of the toggle. |
|
Toggling was one solution I had in mind so it is fine! showing full path without toggling as a small footer with a "copy path" if you were to double click the footer would also be an alternative/follow-up improvement. Otherwise just toggling is great! thanks! |
Display module names instead of full file paths (
/home/user/project/pkg/mod.py→pkg.mod) in flamegraph for readability.CC: @pablogsal @lkollar
The issue: