Rename threadCPURatio to threadCPUPercent and make it a Uint8Array#5898
Merged
mstange merged 1 commit intofirefox-devtools:mainfrom Mar 24, 2026
Merged
Rename threadCPURatio to threadCPUPercent and make it a Uint8Array#5898mstange merged 1 commit intofirefox-devtools:mainfrom
mstange merged 1 commit intofirefox-devtools:mainfrom
Conversation
163c939 to
cde9ded
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5898 +/- ##
==========================================
- Coverage 85.42% 85.41% -0.01%
==========================================
Files 321 321
Lines 32168 32157 -11
Branches 8785 8865 +80
==========================================
- Hits 27479 27468 -11
Misses 4253 4253
Partials 436 436 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This turns it into a Uint8Array of integer percentages, which requires less memory bandwidth when rendering the activity graph. We now always have a fallback threadCPUPercent array, even if the original profile doesn't contain any threadCPUDelta information. The synthesized values are set to 100%. We also have a trailing extra value in order to simplify the rendering code for the last sample.
cde9ded to
f3f07c7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This turns it into a Uint8Array of integer percentages, which requires less memory bandwidth when rendering the activity graph.
We now always have a fallback threadCPUPercent array, even if the original profile doesn't contain any threadCPUDelta information. The synthesized values are set to 100%.
We also have a trailing extra value in order to simplify the rendering code for the last sample.
There's one behavior change related to the one-past-the-end value: In the past, we said "after the last sample, continue with the same CPU percentage as just before the last sample". Now we say "after the last sample, the CPU percentage is zero." The profile from the
'matches the 2d canvas draw snapshot with only one CPU usage value'test demonstrates this:Main branch | Deploy preview