-
-
Notifications
You must be signed in to change notification settings - Fork 342
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 profile serialization schema #3932
feat(profiling): continuous profile serialization schema #3932
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
|
Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
7bb0873 | 1360.94 ms | 1362.24 ms | 1.30 ms |
dc0db9e | 1222.10 ms | 1240.90 ms | 18.80 ms |
5e65d2b | 1216.08 ms | 1236.08 ms | 20.00 ms |
62c15d4 | 1231.80 ms | 1248.86 ms | 17.06 ms |
b35ccd0 | 1238.67 ms | 1260.35 ms | 21.67 ms |
98713e6 | 1211.48 ms | 1244.42 ms | 32.94 ms |
3f366ee | 1244.49 ms | 1257.28 ms | 12.79 ms |
b2f82fa | 1237.78 ms | 1256.02 ms | 18.24 ms |
42ef6ba | 1219.58 ms | 1245.37 ms | 25.78 ms |
3db3e35 | 1248.02 ms | 1258.35 ms | 10.33 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
7bb0873 | 22.85 KiB | 407.09 KiB | 384.24 KiB |
dc0db9e | 20.76 KiB | 419.62 KiB | 398.86 KiB |
5e65d2b | 21.58 KiB | 616.67 KiB | 595.09 KiB |
62c15d4 | 22.85 KiB | 411.14 KiB | 388.29 KiB |
b35ccd0 | 21.58 KiB | 573.13 KiB | 551.55 KiB |
98713e6 | 20.76 KiB | 435.22 KiB | 414.46 KiB |
3f366ee | 20.76 KiB | 427.84 KiB | 407.08 KiB |
b2f82fa | 20.76 KiB | 419.62 KiB | 398.86 KiB |
42ef6ba | 21.58 KiB | 417.86 KiB | 396.28 KiB |
3db3e35 | 21.58 KiB | 419.21 KiB | 397.63 KiB |
Previous results on branch: armcknight/feat/3555-continuous-profiling/5-implementation/2-schema-serialization
Startup times
Revision | Plain | With Sentry | Diff |
---|---|---|---|
d9b4c67 | 1239.04 ms | 1253.81 ms | 14.77 ms |
e78fbaf | 1234.37 ms | 1249.00 ms | 14.63 ms |
33bd2ca | 1227.50 ms | 1245.12 ms | 17.62 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
d9b4c67 | 21.58 KiB | 620.30 KiB | 598.72 KiB |
e78fbaf | 21.58 KiB | 620.26 KiB | 598.68 KiB |
33bd2ca | 21.58 KiB | 620.40 KiB | 598.82 KiB |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3932 +/- ##
=============================================
+ Coverage 90.844% 90.855% +0.010%
=============================================
Files 593 594 +1
Lines 45974 46290 +316
Branches 16383 16554 +171
=============================================
+ Hits 41765 42057 +292
- Misses 4139 4163 +24
Partials 70 70
... and 22 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
…continuous-profiling/5-implementation/2-schema-serialization
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.
A couple of issues, but looking good already 👍
…continuous-profiling/5-implementation/2-schema-serialization
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, thanks 👍
#skip-changelog, for #3555
Implements the necessary schema changes for how continuous profiling chunks will be serialized, and their envelope structure. This was cribbed from the current functions that do the same for legacy profiles (
sentry_serializedProfileDataLegacy
andsentry_profileEnvelopeItemLegacy
) to createsentry_serializedContinuousProfileChunk
andsentry_continuousProfileChunkEnvelope
.Also implements the timer logic to transmit those envelopes every time it fires in
SentryProfiler.mm
.Added assertions for the new schema to
SentryContinuousProfilerTests.swift
. Those tests will simulate sending multiple chunks per test, validating the contents of each, which have unique data per chunk to ensure the same data isn't carrying over, and that the profiler is still running after transmitting each until the profiler is explicitly stopped.