Content-Length: 379152 | pFad | http://github.com/python/cpython/pull/150266

70 gh-150258: Show relative percentage on Tachyon flamegraph by edvilme · Pull Request #150266 · python/cpython · GitHub
Skip to content

gh-150258: Show relative percentage on Tachyon flamegraph#150266

Open
edvilme wants to merge 8 commits into
python:mainfrom
edvilme:tachyon-relative-percentage
Open

gh-150258: Show relative percentage on Tachyon flamegraph#150266
edvilme wants to merge 8 commits into
python:mainfrom
edvilme:tachyon-relative-percentage

Conversation

@edvilme
Copy link
Copy Markdown
Contributor

@edvilme edvilme commented May 22, 2026

When running profiling, users rarely care about the global percentage of the runtime. Often, they want to select a function and measure child percentages relative to that.

This PR updates the flamegraph tooltips to show both "Percentage" and "Relative Percentage" when the user clicks a specific function.

Fixes #150258

Visualization

With no functions selected
image

With a function selected
image

Remarks

"Relative percentage" is only shown for the children of the selected node (<100%)

When running profiling, users rarely care about the global percentage of
the runtime. Often, they want to select a function and measure child
percentages relative to that.

This PR updates the flamegraph tooltips to show both "Percentage" and
"Relative Percentage" when the user clicks a specific function.

Fixes python#150258
Comment thread Lib/profiling/sampling/_flamegraph_assets/flamegraph.js
Comment thread Lib/profiling/sampling/_flamegraph_assets/flamegraph.js Outdated
Comment thread Lib/profiling/sampling/_flamegraph_assets/flamegraph.js Outdated
Copy link
Copy Markdown

@scottshambaugh scottshambaugh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally and this matches what I was looking for in the issue, thanks for putting this together!

@edvilme
Copy link
Copy Markdown
Contributor Author

edvilme commented May 22, 2026

Tested locally and this matches what I was looking for in the issue, thanks for putting this together!

Thx for all the feedback! Glad it matches what you were looking for. I also think this will be useful! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Split "Percentage" in tachyon flamegraph tooltip UI to "Percentage of Root" and "Percentage of Selected"

2 participants









ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/python/cpython/pull/150266

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy