A flame graph shows profiled execution as a vertical stack: the bottom is where the thread starts, and each level above contains methods called by the level below. It adds a view of relative execution time to the call tree, helping reveal potential latencies. section 8.3
Read the graph by following the call levels and comparing widths:
- Methods on the same level share a caller below them. section 8.3
- A method’s width represents its execution time relative to its caller; sibling widths together span the caller’s width. section 8.3
- Colorization rules can highlight selected layers and help compare execution times. section 8.3
Compare sibling methods
In the example, ProductService.getProductNamesForPurchases() calls ProductRepository.findById() and PurchaseRepository.findAll(). Both appear on the same level, but findAll() is wider, indicating more execution time relative to their caller. section 8.3
Figure 8.17 The flame graph is a stack representation of the execution trace. Each level shows the methods called by the level below. The first (bottom) level of the stack is the start of the thread. This way, we see the execution stack vertically, while the flame graph horizontally indicates the time spent by each level relative to the level below.
Use the execution-stack diagram to see how call levels map to the flame graph’s vertical and horizontal dimensions. section 8.3


