-
-
Notifications
You must be signed in to change notification settings - Fork 375
fix: profiling transaction thread IDs #2358
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: profiling transaction thread IDs #2358
Conversation
- required changing SentryTracer to an ObjC++ file to use our C++ interface to get thread IDs; when this happened, a latent type mismatch was uncovered, breaking the compilation. it required a bit of a nonobvious semantic change from `false` (which resolves to 0, where parentSampled used to be a boolean type property set to false, and was changed to the NSUInteger-backed enum) to `kSentrySampleDecisionUndecided` (which is the 0 value in the enum), and not kSentrySampleDecisionNo as "false" might imply
Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| bdfccaa | 1202.83 ms | 1228.96 ms | 26.13 ms |
| 0fdf0b2 | 1249.20 ms | 1254.08 ms | 4.88 ms |
| d47c2c0 | 1230.55 ms | 1250.22 ms | 19.67 ms |
| 64225be | 1213.96 ms | 1227.62 ms | 13.66 ms |
| b15627c | 1228.88 ms | 1269.70 ms | 40.82 ms |
| f6eee7c | 1227.39 ms | 1240.76 ms | 13.37 ms |
| 5ecf9f6 | 1230.76 ms | 1232.86 ms | 2.10 ms |
| 0fdf0b2 | 1266.27 ms | 1277.90 ms | 11.63 ms |
| 6dc0bd1 | 1220.49 ms | 1237.44 ms | 16.95 ms |
| 7138b7d | 1243.40 ms | 1252.08 ms | 8.68 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| bdfccaa | 20.50 KiB | 361.80 KiB | 341.29 KiB |
| 0fdf0b2 | 20.51 KiB | 332.90 KiB | 312.39 KiB |
| d47c2c0 | 20.50 KiB | 342.31 KiB | 321.80 KiB |
| 64225be | 20.50 KiB | 339.02 KiB | 318.52 KiB |
| b15627c | 20.50 KiB | 337.76 KiB | 317.25 KiB |
| f6eee7c | 20.50 KiB | 361.89 KiB | 341.39 KiB |
| 5ecf9f6 | 20.51 KiB | 332.66 KiB | 312.15 KiB |
| 0fdf0b2 | 20.51 KiB | 332.90 KiB | 312.39 KiB |
| 6dc0bd1 | 20.51 KiB | 333.58 KiB | 313.07 KiB |
| 7138b7d | 20.51 KiB | 331.79 KiB | 311.28 KiB |
Previous results on branch: armcknight/fix/profiling-transaction-thread-IDs
Startup times
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| bd08699 | 1241.84 ms | 1265.35 ms | 23.51 ms |
| dd74e7d | 1255.92 ms | 1261.12 ms | 5.20 ms |
| 7d757a7 | 1209.02 ms | 1247.90 ms | 38.88 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| bd08699 | 20.50 KiB | 365.50 KiB | 345.00 KiB |
| dd74e7d | 20.50 KiB | 365.51 KiB | 345.01 KiB |
| 7d757a7 | 20.50 KiB | 365.51 KiB | 345.01 KiB |
Co-authored-by: Dhiogo Brustolin <[email protected]>
brustolin
left a comment
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
philipphofmann
left a comment
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 some tests for the new functionality in SentryTransactionContext.
| return self; | ||
| } | ||
|
|
||
| - (void)getThreadInfo |
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.
m: It would be great to add some tests for this new functionality.
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.
We've got the ThreadHandle system under test here and here, and SentryThread has unit tests here.
We test that this field is nonempty here but I don't think we should use this spot as another place to test whether we're getting what we think is the correct thread info, it's not scalable to do this for every usage. If we think there's an issue with ThreadHandle or SentryThread let's take care of it separately.
|
what is going on with the code formatter |
* master: test: Delete empty OOMLogicTests (#2361) fix: profiling transaction timestamps (#2359) fix: profiling transaction thread IDs (#2358) test: Use flush for macOS-SPM sample (#2360) release: 7.30.0 fix: SentryCrash writing nan for invalid number (#2348) HTTP Client errors (#2308) ci: Call make for analyze (#2353) fix: CoreData tracking entity name retrieval (#2329) fix: sampled profile format backend validation errors (#2350) build(deps): bump github/codeql-action from 2.1.29 to 2.1.30 (#2351) build(deps): bump github/codeql-action from 2.1.28 to 2.1.29 (#2344) fix: Fixed flaky testTimezoneChangeNotificationBreadcrumb (#2335) # Conflicts: # Sentry.xcodeproj/project.pbxproj
required changing SentryTracer to an ObjC++ file to use our C++ interface to get thread IDs; when this happened, a latent type mismatch was uncovered, breaking the compilation. it required a bit of a nonobvious semantic change from false (which resolves to 0, where parentSampled used to be a boolean type property set to false, and was changed to the NSUInteger-backed enum) to kSentrySampleDecisionUndecided (which is the 0 value in the enum), and not kSentrySampleDecisionNo as "false" might imply
fixes #2356