Skip to content

Conversation

@fqueze
Copy link
Contributor

@fqueze fqueze commented Dec 14, 2025

Add a new experimental feature to visualize sampling intervals within each process. This helps identify when samples were missed, delayed, or when there are variations in sampling frequency.

The feature is similar to experimental.enableProcessCPUTracks() and can be enabled via the console with:
experimental.enableSamplingIntervalTracks()

Implementation details:

  • Add 'sampling-interval' LocalTrack type
  • Create TrackSamplingInterval and TrackSamplingIntervalGraph components
  • Implement canvas rendering with max-min decimation optimization
  • Add hover tooltips showing actual vs expected sampling intervals
  • Include hover dot indicator for currently inspected sample

Example power profile where I was interested in seeing inconsistencies in sampling rate from the power meter: https://share.firefox.dev/48U79KE
Example Firefox profile with lots of missing samples: https://share.firefox.dev/4p5d8mc

Add a new experimental feature to visualize sampling intervals within
each process. This helps identify when samples were missed, delayed,
or when there are variations in sampling frequency.

The feature is similar to experimental.enableProcessCPUTracks() and can
be enabled via the console with:
  experimental.enableSamplingIntervalTracks()

Implementation details:
- Add 'sampling-interval' LocalTrack type
- Create TrackSamplingInterval and TrackSamplingIntervalGraph components
- Implement canvas rendering with max-min decimation optimization
- Add hover tooltips showing actual vs expected sampling intervals
- Include hover dot indicator for currently inspected sample
@fqueze
Copy link
Contributor Author

fqueze commented Dec 14, 2025

Screenshot of a case where this helped figure out that there was a connection between spikes in the power track and changes in sampling rate:
image

@codecov
Copy link

codecov bot commented Dec 14, 2025

Codecov Report

❌ Patch coverage is 4.34783% with 264 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.93%. Comparing base (1342c91) to head (acb7cd8).
⚠️ Report is 44 commits behind head on main.

Files with missing lines Patch % Lines
...components/timeline/TrackSamplingIntervalGraph.tsx 0.98% 202 Missing ⚠️
src/profile-logic/tracks.ts 0.00% 17 Missing ⚠️
src/actions/app.ts 0.00% 16 Missing ⚠️
src/actions/profile-view.ts 0.00% 8 Missing ⚠️
src/components/timeline/TrackSamplingInterval.tsx 14.28% 6 Missing ⚠️
src/components/timeline/LocalTrack.tsx 0.00% 5 Missing ⚠️
src/utils/window-console.ts 0.00% 4 Missing ⚠️
src/selectors/app.tsx 25.00% 3 Missing ⚠️
src/reducers/app.ts 71.42% 2 Missing ⚠️
src/test/fixtures/profiles/tracks.ts 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5719      +/-   ##
==========================================
- Coverage   85.62%   84.93%   -0.70%     
==========================================
  Files         312      315       +3     
  Lines       30880    31288     +408     
  Branches     8504     8511       +7     
==========================================
+ Hits        26441    26574     +133     
- Misses       4009     4284     +275     
  Partials      430      430              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant