flamegraph
also: flame graph, call stack visualization
A visualization technique that displays CPU usage across a program's call stack as a hierarchical, stacked bar chart where wider bars represent functions consuming more CPU time.
A flamegraph is a performance profiling visualization created by Brendan Gregg that maps out where a program spends its CPU cycles. The chart shows the complete call stack vertically (with main() at the bottom) and CPU time horizontally, using color to distinguish different functions.
Each bar's width represents the amount of CPU time that function consumed. For example, if parse_json() calls validate(), which consumes 40% of the time, you'll see the validate() bar sitting on top of parse_json(), occupying 40% of its width. This makes bottlenecks immediately obvious—wide bars at the top are your culprits.
Flamegraphs are typically generated using profiling tools like perf, py-spy, or flamegraph.pl scripts. They're invaluable for optimization because they show not just which functions are slow, but also why—revealing the exact code path that led there.