◐ Shell
clean mode source ↗

Add a new heatmap output to the tachyon profiler

It would be helpful to have a --heatmap output format that shows line-by-line sample intensity, similar to coverage.py's HTML reports.

Flamegraphs show which functions are hot and how they're called, but they don't tell you which lines within a function are the bottlenecks. The heatmap would solve this by showing the actual source code with color-coded lines (blue to red) based on sample counts, making it easy to spot hot loops, expensive operations, or unexpected hotspots within a function.

Usage would be: python -m profiling.sampling --heatmap -o results script.py

Linked PRs