-
-
Notifications
You must be signed in to change notification settings - Fork 306
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(profiling): continuous profiler basic implementation #3913
feat(profiling): continuous profiler basic implementation #3913
Conversation
… to separate code unit
…ure of profiler frequency; remove duplicate declaration of threadSanitizerIsPresent(); move some SentryProfiler.mm imports into SENTRY_HAS_UIKIT gate
…ctly from dep container in profile serialization
- move old profiler control logic to new SentryLegacyProfiler class, leaving SentryProfiler to only contain the state and internal reference to SamplingProfiler
…and SentryLegacyProfiler+Test
…g underscore for public members
…continuous-profiling/4-refactoring/3-renames
This reverts commit 9a9d689.
…/5-profile-serialization' into armcknight/feat/3555-continuous-profiling/4-refactoring/6-re-renames
…/6-re-renames' into armcknight/feat/3555-continuous-profiling/5-implementation/1-continuous-profiling
…continuous-profiling/5-implementation/1-continuous-profiling
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3913 +/- ##
=============================================
- Coverage 90.806% 90.806% -0.001%
=============================================
Files 588 591 +3
Lines 45879 45954 +75
Branches 16370 16410 +40
=============================================
+ Hits 41661 41729 +68
- Misses 4148 4155 +7
Partials 70 70
... and 7 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
eb41178 | 1228.06 ms | 1248.37 ms | 20.31 ms |
25d925a | 1232.89 ms | 1248.41 ms | 15.52 ms |
ce4cfaf | 1203.61 ms | 1218.86 ms | 15.25 ms |
ee8b48f | 1204.04 ms | 1216.70 ms | 12.66 ms |
50bbebb | 1234.76 ms | 1246.66 ms | 11.90 ms |
369222e | 1232.14 ms | 1258.90 ms | 26.76 ms |
e1cd9e9 | 1203.93 ms | 1239.12 ms | 35.19 ms |
83d84d7 | 1244.92 ms | 1253.34 ms | 8.42 ms |
5f8ee7a | 1253.96 ms | 1264.98 ms | 11.02 ms |
9dbf743 | 1252.10 ms | 1262.10 ms | 10.00 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
eb41178 | 21.58 KiB | 544.86 KiB | 523.28 KiB |
25d925a | 21.58 KiB | 418.82 KiB | 397.24 KiB |
ce4cfaf | 20.76 KiB | 423.19 KiB | 402.43 KiB |
ee8b48f | 21.58 KiB | 418.70 KiB | 397.11 KiB |
50bbebb | 21.58 KiB | 414.96 KiB | 393.38 KiB |
369222e | 20.76 KiB | 419.67 KiB | 398.91 KiB |
e1cd9e9 | 22.85 KiB | 412.95 KiB | 390.10 KiB |
83d84d7 | 22.84 KiB | 402.56 KiB | 379.72 KiB |
5f8ee7a | 22.85 KiB | 411.93 KiB | 389.08 KiB |
9dbf743 | 20.76 KiB | 434.94 KiB | 414.18 KiB |
Previous results on branch: armcknight/feat/3555-continuous-profiling/5-implementation/1-continuous-profiling
Startup times
Revision | Plain | With Sentry | Diff |
---|---|---|---|
bcfe763 | 1238.71 ms | 1252.82 ms | 14.11 ms |
69a92e8 | 1230.06 ms | 1249.22 ms | 19.16 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
bcfe763 | 21.58 KiB | 614.95 KiB | 593.37 KiB |
69a92e8 | 21.58 KiB | 617.11 KiB | 595.52 KiB |
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.
Looks good for me. Thanks!!
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, with mostly nitpicks.
…continuous-profiling/5-implementation/1-continuous-profiling
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.
Again LGTM
For #3555; #skip-changelog
Starting and stopping automatically on given events, including launch profiling, will be handled in a subsequent PR.
This extracts the remaining class functions from SentryProfiler.mm to a new class SentryLegacyProfiler, to parallel the previously created and stubbed SentryContinuousProfiler.
All that then remains of SentryProfiler are the instance methods. Both the legacy and continuous classes will use an instance of SentryProfiler and control it with their respective specified behaviors. SentryProfiler is now initialized with an enum to specify whether it is running in legacy or continuous mode. It will use this to e.g. decide what to do when its timer expires (stop profiling in legacy, send a chunk in continuous–this part is also left for a later PR).
Also renamed SentryProfilerSwiftTests.swift to SentryLegacyProfilerTests and created a new SentryContinuousProfilerTests class, and factored out the fixture to a separate file in SentryProfileTestFixture.