Skip to content

Add a new heatmap output to the tachyon profiler #140677

@pablogsal

Description

@pablogsal

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytopic-profilingtype-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions