Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

gh-138122: Fix sample counting for filtered profiling modes#142677

Merged
pablogsal merged 1 commit into
python:mainpython/cpython:mainfrom
pablogsal:tachyon-fix-perpablogsal/cpython:tachyon-fix-perCopy head branch name to clipboard
Dec 14, 2025
Merged

gh-138122: Fix sample counting for filtered profiling modes#142677
pablogsal merged 1 commit into
python:mainpython/cpython:mainfrom
pablogsal:tachyon-fix-perpablogsal/cpython:tachyon-fix-perCopy head branch name to clipboard

Conversation

@pablogsal

@pablogsal pablogsal commented Dec 13, 2025

Copy link
Copy Markdown
Member

The live collector's efficiency bar was incorrectly showing 0% success
rate when using filtered modes like --mode exception where no thread had
an active exception. This happened because samples were only counted as
successful when frames were actually processed, conflating "profiler
health" with "filter hit rate".

Samples are now always counted as successful when the profiler can read
from the target process, regardless of whether any frames matched the
current filter. This ensures the efficiency bar accurately reflects
profiler connectivity rather than filter selectivity. The invariant
total_samples == successful_samples + failed_samples is now properly
maintained.

The live collector's efficiency bar was incorrectly showing 0% success
rate when using filtered modes like --mode exception where no thread had
an active exception. This happened because samples were only counted as
successful when frames were actually processed, conflating "profiler
health" with "filter hit rate".

Samples are now always counted as successful when the profiler can read
from the target process, regardless of whether any frames matched the
current filter. This ensures the efficiency bar accurately reflects
profiler connectivity rather than filter selectivity. The invariant
total_samples == successful_samples + failed_samples is now properly
maintained.
@pablogsal pablogsal merged commit 52daab1 into python:main Dec 14, 2025
85 of 87 checks passed
@pablogsal pablogsal deleted the tachyon-fix-per branch December 14, 2025 03:31
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.

1 participant

Morty Proxy This is a proxified and sanitized view of the page, visit original site.