pyroscope icon indicating copy to clipboard operation
pyroscope copied to clipboard

Implement backend top table (self, total)

Open simonswine opened this issue 3 months ago • 2 comments

Is your feature request related to a problem? Please describe.

The UI currently derives the functions TOP table from the flame graph. As a result of truncation happening on the flame graph data (through maxNodes), the "self" top table might be containing significant parts of "other" resource usage.

Image

Describe the solution you'd like

We should calculate the top k list on the backend for each self and total and return the TOP k elements separately to the flamegraph's data.

Alternatives

  • Just don't display others in the top table.
  • Detail what self usages others has, but don't keep the tree structure.

Additional context

I am still a bit unsure about, how tricky the mismatches between numbers on the table and the flamegraph are for users to comprehend. Also

simonswine avatar Sep 04 '25 14:09 simonswine

@alsoba13 please take a look and add some more context, if you think I forgot something.

simonswine avatar Sep 04 '25 14:09 simonswine

This is also slightly realted, but it improves how the flamegraph table shows others: https://github.com/grafana/grafana/issues/110677

simonswine avatar Sep 05 '25 11:09 simonswine