[RUM-8785]: Refactoring JankStatsActivityLifecycleListener#2513
Merged
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
|
0xnm
reviewed
Feb 27, 2025
jonathanmos
reviewed
Feb 27, 2025
ambushwork
previously approved these changes
Feb 27, 2025
jonathanmos
previously approved these changes
Feb 27, 2025
satween
force-pushed
the
tvaleev/RUM-8785
branch
from
February 27, 2025 16:29
c5ee637 to
e317b45
Compare
0xnm
previously approved these changes
Feb 28, 2025
0xnm
left a comment
Member
There was a problem hiding this comment.
I left few comments, but nothing blocking.
Comment on lines
+301
to
+306
| @SuppressLint("InlinedApi") | ||
| if (buildSdkVersionProvider.version >= Build.VERSION_CODES.O) { | ||
| intendedVsyncTimestamp = frameMetrics.getMetric(FrameMetrics.INTENDED_VSYNC_TIMESTAMP) | ||
| vsyncTimestamp = frameMetrics.getMetric(FrameMetrics.VSYNC_TIMESTAMP) | ||
| } | ||
| @SuppressLint("InlinedApi") |
Member
There was a problem hiding this comment.
why these annotations are needed? If removed, what is the error?
Contributor
Author
ambushwork
approved these changes
Feb 28, 2025
xgouchet
approved these changes
Feb 28, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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)