Show the precise CPU usage information in the tooltip instead of the smoothed values#4623
Merged
Merged
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #4623 +/- ##
=======================================
Coverage 88.47% 88.47%
=======================================
Files 295 295
Lines 26239 26241 +2
Branches 7072 7072
=======================================
+ Hits 23216 23218 +2
Misses 2812 2812
Partials 211 211
☔ View full report in Codecov by Sentry. |
julienw
approved these changes
May 17, 2023
julienw
left a comment
Contributor
There was a problem hiding this comment.
Thanks, this is much better!
| it('renders the CPU usage properly in the areas where blur is applied', () => { | ||
| const profile = getProfileWithCPU([null, 400, 580, 1000], 'µs'); | ||
|
|
||
| // Let's check the second threadCPUDelta value |
Contributor
There was a problem hiding this comment.
this is the one with 580, right? And the result us 58% because the max is 1000, is that right? Can you please write a small comment explaining more why the expected result is this?
Member
Author
There was a problem hiding this comment.
Yes, that's correct. Added a comment.
| @@ -53,9 +53,22 @@ function getSamplesPixelPosition( | |||
| // +--------------------+--------------------+--------------------+ | |||
Contributor
There was a problem hiding this comment.
nit: please update the comment here :-)
0989d88 to
c98de7e
Compare
Merged
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.
Previously we were using the smoothed values for the CPU information which wasn't correct. With this PR, we are now keeping the raw calculated CPU usage values per pixel, and then get these numbers while we are doing the hittesting to show them in the tooltip.
Example profile: production / deploy preview