Open
Conversation
Fix SentrySystemWrapper CPU usage calculation by dividing Mach thread cpu_usage by TH_USAGE_SCALE, then normalizing by processor count and converting to 0..100 percent. Updates docs and adds test for the normalization logic.
Contributor
Semver Impact of This PR🟢 Patch (bug fixes) 📋 Changelog PreviewThis is how your changes will appear in the changelog. Bug Fixes 🐛
Internal Changes 🔧Deps
🤖 This preview updates automatically when you update the PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7798 +/- ##
=============================================
- Coverage 85.416% 85.411% -0.005%
=============================================
Files 487 487
Lines 29190 29195 +5
Branches 12625 12652 +27
=============================================
+ Hits 24933 24936 +3
- Misses 4207 4210 +3
+ Partials 50 49 -1
... and 5 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
📲 Install BuildsiOS
|
Contributor
Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 21fb20e | 1217.43 ms | 1230.91 ms | 13.48 ms |
| 16b3235 | 1234.51 ms | 1257.84 ms | 23.33 ms |
| fd24b7c | 1222.39 ms | 1259.67 ms | 37.28 ms |
| d6d7fcf | 1192.78 ms | 1215.60 ms | 22.83 ms |
| d0b4402 | 1218.62 ms | 1241.80 ms | 23.18 ms |
| db9e223 | 1193.69 ms | 1213.56 ms | 19.87 ms |
| e92ab66 | 1228.86 ms | 1258.43 ms | 29.57 ms |
| bed2eb7 | 1215.88 ms | 1247.14 ms | 31.27 ms |
| 06cf46a | 1222.49 ms | 1261.13 ms | 38.64 ms |
| 09a80f2 | 1214.78 ms | 1237.85 ms | 23.07 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 21fb20e | 24.14 KiB | 1.12 MiB | 1.09 MiB |
| 16b3235 | 24.14 KiB | 1.11 MiB | 1.09 MiB |
| fd24b7c | 24.14 KiB | 1.07 MiB | 1.04 MiB |
| d6d7fcf | 24.14 KiB | 1.12 MiB | 1.10 MiB |
| d0b4402 | 24.14 KiB | 1.11 MiB | 1.08 MiB |
| db9e223 | 24.14 KiB | 1.06 MiB | 1.03 MiB |
| e92ab66 | 24.14 KiB | 1.10 MiB | 1.08 MiB |
| bed2eb7 | 24.14 KiB | 1.07 MiB | 1.04 MiB |
| 06cf46a | 24.14 KiB | 1.13 MiB | 1.10 MiB |
| 09a80f2 | 24.14 KiB | 1.10 MiB | 1.08 MiB |
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.
📜 Description
Fix SentrySystemWrapper CPU usage calculation by dividing Mach thread cpu_usage by TH_USAGE_SCALE, then normalizing by processor count and converting to 0..100 percent. Updates docs and adds test for the normalization logic.
💡 Motivation and Context
Closes #7456
💚 How did you test it?
Unit Tests
📝 Checklist
You have to check all boxes before merging:
sendDefaultPIIis enabled.