-
Notifications
You must be signed in to change notification settings - Fork 64
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
[RUM-8785]: Refactoring JankStatsActivityLifecycleListener #2513
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #2513 +/- ##
===========================================
+ Coverage 70.02% 70.06% +0.05%
===========================================
Files 794 796 +2
Lines 29875 29927 +52
Branches 4991 5001 +10
===========================================
+ Hits 20917 20968 +51
+ Misses 7579 7572 -7
- Partials 1379 1387 +8
|
...rc/main/kotlin/com/datadog/android/rum/internal/vitals/JankStatsActivityLifecycleListener.kt
Show resolved
Hide resolved
...rc/main/kotlin/com/datadog/android/rum/internal/vitals/JankStatsActivityLifecycleListener.kt
Outdated
Show resolved
Hide resolved
...-sdk-android-rum/src/main/kotlin/com/datadog/android/rum/internal/domain/FrameMetricsData.kt
Outdated
Show resolved
Hide resolved
...-android-rum/src/test/kotlin/com/datadog/android/rum/internal/vitals/FPSVitalListenerTest.kt
Outdated
Show resolved
Hide resolved
...est/kotlin/com/datadog/android/rum/internal/vitals/JankStatsActivityLifecycleListenerTest.kt
Outdated
Show resolved
Hide resolved
...n/com/datadog/android/rum/metric/interactiontonextview/TimeBasedInteractionIdentifierTest.kt
Show resolved
Hide resolved
...-sdk-android-rum/src/main/kotlin/com/datadog/android/rum/internal/vitals/FPSVitalListener.kt
Outdated
Show resolved
Hide resolved
features/dd-sdk-android-rum/src/main/kotlin/com/datadog/android/rum/internal/RumFeature.kt
Outdated
Show resolved
Hide resolved
c5ee637
to
e317b45
Compare
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 left few comments, but nothing blocking.
...-sdk-android-rum/src/main/kotlin/com/datadog/android/rum/internal/vitals/FPSVitalListener.kt
Show resolved
Hide resolved
...rc/main/kotlin/com/datadog/android/rum/internal/vitals/JankStatsActivityLifecycleListener.kt
Outdated
Show resolved
Hide resolved
@SuppressLint("InlinedApi") | ||
if (buildSdkVersionProvider.version >= Build.VERSION_CODES.O) { | ||
intendedVsyncTimestamp = frameMetrics.getMetric(FrameMetrics.INTENDED_VSYNC_TIMESTAMP) | ||
vsyncTimestamp = frameMetrics.getMetric(FrameMetrics.VSYNC_TIMESTAMP) | ||
} | ||
@SuppressLint("InlinedApi") |
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.
why these annotations are needed? If removed, what is the error?
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.
What does this PR do?
In this PR we decoupling FrameMetrics subscription logic and FPS computation. Listener delegates were introduced for future ui slowness metrics support.
Motivation
This class makes too much work and make impossible to reuse subscription logic. Core idea to subscribe for the metrics in one single place and use collected info in several monitors.
Review checklist (to be filled by reviewers)