-
-
Notifications
You must be signed in to change notification settings - Fork 444
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
Collect slow and frozen frames for spans #3111
Collect slow and frozen frames for spans #3111
Conversation
…SpanFrameMetricsCollector
|
Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
5344734 | 417.38 ms | 478.70 ms | 61.32 ms |
243f1a4 | 405.48 ms | 474.32 ms | 68.84 ms |
a5e1504 | 379.98 ms | 463.29 ms | 83.31 ms |
7b303a4 | 381.72 ms | 445.56 ms | 63.84 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
5344734 | 1.72 MiB | 2.27 MiB | 558.34 KiB |
243f1a4 | 1.72 MiB | 2.27 MiB | 558.42 KiB |
a5e1504 | 1.72 MiB | 2.27 MiB | 558.86 KiB |
7b303a4 | 1.72 MiB | 2.27 MiB | 558.34 KiB |
Previous results on branch: feat/slow-frozen-frames-span-data
Startup times
Revision | Plain | With Sentry | Diff |
---|---|---|---|
cf10143 | 401.54 ms | 484.12 ms | 82.58 ms |
90a5e12 | 369.89 ms | 444.17 ms | 74.27 ms |
e445344 | 403.17 ms | 487.92 ms | 84.75 ms |
f8ae166 | 404.67 ms | 485.78 ms | 81.11 ms |
e74753f | 394.16 ms | 459.81 ms | 65.65 ms |
ffac13d | 372.33 ms | 486.52 ms | 114.19 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
cf10143 | 1.72 MiB | 2.27 MiB | 559.32 KiB |
90a5e12 | 1.72 MiB | 2.27 MiB | 559.49 KiB |
e445344 | 1.72 MiB | 2.27 MiB | 559.45 KiB |
f8ae166 | 1.72 MiB | 2.27 MiB | 559.44 KiB |
e74753f | 1.72 MiB | 2.27 MiB | 559.45 KiB |
ffac13d | 1.72 MiB | 2.27 MiB | 559.34 KiB |
frozenFrameDuration = 0; | ||
} | ||
|
||
public FrameMetrics duplicate() { |
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.
nit: we usually call it clone()
in other places
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.
sentry-android-core/src/main/java/io/sentry/android/core/FrameMetrics.java
Outdated
Show resolved
Hide resolved
sentry-android-core/src/main/java/io/sentry/android/core/SpanFrameMetricsCollector.java
Outdated
Show resolved
Hide resolved
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!
sentry-android-core/src/main/java/io/sentry/android/core/AndroidTransactionProfiler.java
Outdated
Show resolved
Hide resolved
sentry-android-core/src/main/java/io/sentry/android/core/FrameMetrics.java
Outdated
Show resolved
Hide resolved
sentry-android-core/src/main/java/io/sentry/android/core/SpanFrameMetricsCollector.java
Outdated
Show resolved
Hide resolved
…try/sentry-java into feat/slow-frozen-frames-span-data
This reverts commit 5b9c3c6.
* Extend performance collector APIs * Update changelog * Update changelog * Collect slow and frozen frames for spans (#3111) * Collect slow and frozen frames using SentryFrameMetricsCollector and SpanFrameMetricsCollector * Rename fast frame to normal frame, remove fastFrameDuration * Extend performance collector APIs * Update changelog * Collect slow and frozen frames using SentryFrameMetricsCollector and SpanFrameMetricsCollector * Rename fast frame to normal frame, remove fastFrameDuration * Fix PR feedback * Fix nullability and remove unused field * Rename FrameMetrics to SentryFrameMetrics * Collect delay instead of total duration * Fix tests * Revert "Fix tests" This reverts commit 5b9c3c6. * Properly fix tests * Collect slow and frozen frames as measurements (#3155) * Ensure slow and frozen frames values are reported as measurement values as well * Interpolate total frame count to match span duration (#3158) * Interpolate total frame count to match span duration * Update Changelog
By utilizing our existing
SentryFrameMetricsCollector
via a new performance collector:SpanFrameMetricsCollector
📜 Description
Fixes #3106
Based on #3102, which needs to merged first.
If perf-v2 is enabled, the
ActivityFramesTracker
will no-op and insteadSpanFrameMetricsCollector
will start collecting the data on a span level (including the top level transactionISpan
).💡 Motivation and Context
Top level epic: getsentry/team-mobile#156
💚 How did you test it?
Added unit tests.
📝 Checklist
sendDefaultPII
is enabled.🔮 Next steps