Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34k
gh-140677 Add heatmap visualization to Tachyon sampling profiler#140680
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
pablogsal commented Oct 27, 2025 • edited by bedevere-app bot
Loading Uh oh!
There was an error while loading. Please reload this page.
edited by bedevere-app bot
Uh oh!
There was an error while loading. Please reload this page.
b1d5307 to 9ee2b80Comparepablogsal commented Oct 27, 2025
CC @ambv |
Introduce a new --heatmap output format that provides line-by-line execution visualization. The heatmap shows: - Color-coded execution intensity for each line (cold → warm → hot → very hot) - Inline sample counts and percentages per line - Per-file statistics (total samples, hottest line) - Interactive call graph navigation with caller/callee buttons - Module type badges (stdlib, site-packages, project code) Unlike flamegraphs which show call stacks and time distribution, heatmaps excel at identifying hot code paths within files, understanding line-level execution patterns, and navigating through call relationships.
savannahostrowski left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, this is so cool! I left a couple of comments, but also wanted to mention that I really loved that you added a minimap to show hotspots and the permalinking on line click; so nice for jumping around and sharing results.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
pablogsal commented Nov 24, 2025
CC @ivonastojanovic can you give this a pass when you have some time? Test it locally and play a bit with it before reviewing the code |
pablogsal commented Nov 30, 2025
@ivonastojanovic I have updated the buttons to be toggles, pls take a look |
ivonastojanovic left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great! I left a few comments, and I’ll experiment with the CSS a bit
| tree = trees[module_type] | ||
| # Project starts expanded, others start collapsed | ||
| is_collapsed = module_type in ('stdlib', 'site-packages') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the other files be collapsed by default? Since this category typically includes special frames or uncategorized files, users are usually more interested in their own project code first. Collapsing these by default might make navigation clearer?
Uh oh!
There was an error while loading. Please reload this page.
Small changes: - Change navigation button colors for dark theme - Update toggle button colors and active-state text - Add missing "→" in the Intensity legend
ivonastojanovic commented Dec 2, 2025
@pablogsal I ran into a bug during testing, so with Total and Hot enabled, changing the theme makes the sidebar vanish 👀 Screen.Recording.2025-12-02.at.00.15.56.mov |
Co-authored-by: ivonastojanovic <[email protected]>
pablogsal commented Dec 2, 2025
Good catch! Fixed :) |
ivonastojanovic left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
8801c6d into python:mainUh oh!
There was an error while loading. Please reload this page.
pablogsal commented Dec 2, 2025
Thanks a lot @ivonastojanovic and @savannahostrowski for the reviews! |
python#140680) Co-authored-by: Ivona Stojanovic <[email protected]>
Introduce a new --heatmap output format that provides line-by-line
execution visualization. The heatmap shows:
Unlike flamegraphs which show call stacks and time distribution, heatmaps
excel at identifying hot code paths within files, understanding line-level
execution patterns, and navigating through call relationships.