-
-
Notifications
You must be signed in to change notification settings - Fork 329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: simplify dispatch queue wrapper access #3477
fix: simplify dispatch queue wrapper access #3477
Conversation
Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
98a8c16 | 1234.69 ms | 1265.02 ms | 30.33 ms |
591a01b | 1197.94 ms | 1222.53 ms | 24.59 ms |
98713e6 | 1211.48 ms | 1244.42 ms | 32.94 ms |
01a28a9 | 1237.24 ms | 1253.24 ms | 16.00 ms |
dd0557f | 1246.31 ms | 1258.46 ms | 12.15 ms |
2a894d5 | 1211.02 ms | 1236.72 ms | 25.70 ms |
f576153 | 1217.17 ms | 1225.06 ms | 7.89 ms |
17afc4b | 1228.94 ms | 1251.10 ms | 22.16 ms |
1bf8571 | 1250.96 ms | 1255.36 ms | 4.40 ms |
c40576a | 1202.45 ms | 1224.60 ms | 22.15 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
98a8c16 | 20.76 KiB | 431.00 KiB | 410.24 KiB |
591a01b | 22.84 KiB | 401.67 KiB | 378.83 KiB |
98713e6 | 20.76 KiB | 435.22 KiB | 414.46 KiB |
01a28a9 | 22.85 KiB | 405.39 KiB | 382.54 KiB |
dd0557f | 22.85 KiB | 411.75 KiB | 388.90 KiB |
2a894d5 | 21.58 KiB | 414.57 KiB | 392.99 KiB |
f576153 | 20.76 KiB | 425.77 KiB | 405.01 KiB |
17afc4b | 20.76 KiB | 436.25 KiB | 415.49 KiB |
1bf8571 | 20.76 KiB | 437.12 KiB | 416.36 KiB |
c40576a | 22.85 KiB | 407.63 KiB | 384.78 KiB |
Previous results on branch: armcknight/fix/3476-unscheduled-deadline-timer
Startup times
Revision | Plain | With Sentry | Diff |
---|---|---|---|
cca9946 | 1207.15 ms | 1217.80 ms | 10.65 ms |
123eec4 | 1223.96 ms | 1235.18 ms | 11.22 ms |
aead7e8 | 1219.10 ms | 1246.33 ms | 27.22 ms |
619f72b | 1217.63 ms | 1241.55 ms | 23.92 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
cca9946 | 21.58 KiB | 418.43 KiB | 396.85 KiB |
123eec4 | 21.58 KiB | 414.52 KiB | 392.94 KiB |
aead7e8 | 21.58 KiB | 418.43 KiB | 396.85 KiB |
619f72b | 21.58 KiB | 418.21 KiB | 396.62 KiB |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3477 +/- ##
=============================================
+ Coverage 89.214% 89.227% +0.013%
=============================================
Files 528 528
Lines 57538 57552 +14
Branches 20617 20626 +9
=============================================
+ Hits 51332 51352 +20
+ Misses 5295 5291 -4
+ Partials 911 909 -2
... and 12 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, @armcknight. Thanks for fixing this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, if you add a changelog entry @armcknight. You could also change the PR's title to reflect the user benefit instead of the detailed technical change.
3f5d3b1
to
588bf1d
Compare
The thread sanitizer is in an unrelated test case, and failed recently on |
A possible solution to fix #3476. There are several places that we start a transaction with a tracer configuration that lacks a dispatch queue wrapper here:
sentry-cocoa/Sources/Sentry/SentryHub.m
Lines 358 to 365 in b9a9dca
and here:
sentry-cocoa/Sources/Sentry/SentryPerformanceTracker.m
Lines 83 to 90 in b9a9dca
In the spot where we do actually provide it here:
sentry-cocoa/Sources/Sentry/SentryUIEventTrackerTransactionMode.m
Lines 86 to 95 in b9a9dca
that reference is actually just set to the instance held by the dependency container here:
sentry-cocoa/Sources/Sentry/SentryUIEventTrackingIntegration.m
Lines 28 to 30 in b9a9dca
I know we have an ongoing debate about when and where to use DI vs singletons, but let's avoid having this mixture, and take time to completely refactor one dependency at a time to remove the reference completely from SentryDependencyContainer convert to DI in all codepaths.