-
-
Notifications
You must be signed in to change notification settings - Fork 330
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
feat(app launch profiling): add app launch profiling #3529
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
655b9d3
to
f3e920a
Compare
182d7e3
to
5f17e83
Compare
This comment was marked as outdated.
This comment was marked as outdated.
f3e920a
to
9572d11
Compare
9572d11
to
26c750c
Compare
Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
189b629 | 1211.16 ms | 1224.30 ms | 13.14 ms |
98752f3 | 1240.61 ms | 1259.80 ms | 19.18 ms |
06548c0 | 1225.58 ms | 1244.70 ms | 19.12 ms |
f8fc36d | 1226.31 ms | 1247.80 ms | 21.49 ms |
dfde86d | 1215.12 ms | 1221.30 ms | 6.18 ms |
7c5d161 | 1224.38 ms | 1249.66 ms | 25.28 ms |
0dfdaaa | 1226.88 ms | 1248.82 ms | 21.94 ms |
04c0c68 | 1223.22 ms | 1251.24 ms | 28.02 ms |
2ce582e | 1238.98 ms | 1259.66 ms | 20.68 ms |
f2daa68 | 1211.14 ms | 1217.53 ms | 6.39 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
189b629 | 20.76 KiB | 399.69 KiB | 378.93 KiB |
98752f3 | 20.76 KiB | 435.09 KiB | 414.33 KiB |
06548c0 | 20.76 KiB | 427.35 KiB | 406.59 KiB |
f8fc36d | 20.76 KiB | 419.70 KiB | 398.94 KiB |
dfde86d | 21.58 KiB | 414.57 KiB | 392.99 KiB |
7c5d161 | 20.76 KiB | 414.44 KiB | 393.68 KiB |
0dfdaaa | 20.76 KiB | 434.56 KiB | 413.79 KiB |
04c0c68 | 22.85 KiB | 414.09 KiB | 391.24 KiB |
2ce582e | 22.85 KiB | 410.97 KiB | 388.12 KiB |
f2daa68 | 21.58 KiB | 418.40 KiB | 396.82 KiB |
Previous results on branch: armcknight/feat/launch-profiling
Startup times
Revision | Plain | With Sentry | Diff |
---|---|---|---|
55af12d | 1229.06 ms | 1244.85 ms | 15.79 ms |
97fc3fc | 1203.63 ms | 1211.80 ms | 8.16 ms |
a4122ec | 1205.48 ms | 1229.02 ms | 23.54 ms |
8512126 | 1232.21 ms | 1253.60 ms | 21.39 ms |
7d8f64b | 1214.90 ms | 1230.56 ms | 15.67 ms |
2f41ea8 | 1194.29 ms | 1204.35 ms | 10.07 ms |
a2498ae | 1202.59 ms | 1213.83 ms | 11.24 ms |
af0dbfd | 1202.61 ms | 1209.63 ms | 7.02 ms |
54c42ec | 1208.63 ms | 1224.35 ms | 15.71 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
55af12d | 21.58 KiB | 421.23 KiB | 399.65 KiB |
97fc3fc | 21.58 KiB | 420.05 KiB | 398.46 KiB |
a4122ec | 21.58 KiB | 422.04 KiB | 400.46 KiB |
8512126 | 21.58 KiB | 422.65 KiB | 401.06 KiB |
7d8f64b | 21.58 KiB | 422.15 KiB | 400.57 KiB |
2f41ea8 | 21.58 KiB | 427.08 KiB | 405.50 KiB |
a2498ae | 21.58 KiB | 422.10 KiB | 400.51 KiB |
af0dbfd | 21.58 KiB | 422.10 KiB | 400.52 KiB |
54c42ec | 21.58 KiB | 422.66 KiB | 401.08 KiB |
26c750c
to
d8b5c71
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #3529 +/- ##
=============================================
- Coverage 89.348% 89.223% -0.126%
=============================================
Files 530 532 +2
Lines 58291 58691 +400
Branches 20917 21066 +149
=============================================
+ Hits 52082 52366 +284
- Misses 5183 5288 +105
- Partials 1026 1037 +11
... and 15 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
9c89fad
to
3783f92
Compare
I fixed a build error by adding SentryProfilingConditionals.h to iOS-SwiftUI/TestHeaders, and Xcode made a whole bunch of changes in its project file. Not sure what's up with it. See 4866ffa |
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.
I'm excited to see app start profiling moving forward 💪.
As this feature has a high risk of breaking things, I took a close look and added plenty of comments. I haven't completely reviewed all the code, as some comments could lead to a few changes that could make some of my comments outdated.
I will wait to review #3558 as changes here could also bubble up to it.
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.
Philipp did most of the heavy lifting in reviewing this, and it looks good.
I will give it another pass on Monday to understand everything and double-check.
CHANGELOG.md
Outdated
@@ -17,6 +17,7 @@ | |||
|
|||
- Add visionOS as device family (#3548) | |||
- Add VisionOS Support for Carthage (#3565) | |||
- Automatically profile app launches (#3529) |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
This comment was marked as outdated.
This comment was marked as outdated.
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.
I found one more important issue. Apart from that LGTM.
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
Add the possibility to add multiple transports in the TransportAdapter, which is internal. This is a preparation for adding support for Spotlight.
…ht/feat/launch-profiling
…rmcknight/feat/launch-profiling
…hy its failing on saucelabs
The with GH-3529 added test method writeProfileFile crashed when a profile file already existed. Now, the writeProfileFile method exists and prints a debug message when a profiling file already exists and logs an error when it can't write the profile.
This PR and those that follow will add the ability of the SDK to start the profiler as early as possible from our code in order to record profiling information during an app launch..
Internal design doc
Followed by #3558
Docs PR: getsentry/sentry-docs#8876
Major changes:
persist traces/sampling rates to a file we can check on class load, before SentrySDK.startWithOptions is called
add logic to SentryTracer to check the config file and control starting the profiler for launch; because SentryTracer is already the thing that manages SentryProfiler today, this seemed like the best location
notes on some decisions
+[load]
call order so we could start the profiler as early as possible, but decided against it for now, see ref: create root object as superclass for all SDK classes #3532startAppProfile
so customers could do it from their own class load methods, but will save that for iterating; there's a timing experiment I'd like to do first