[RUM-8654] Slow frames collection support #2518
Conversation
| currentViewStartedTimeStampNs = startedTimestampNs | ||
| } | ||
|
|
||
| override fun resolveReport(viewId: String): ViewUIPerformanceData { |
There was a problem hiding this comment.
This function name is not as indicative enough as onViewCreated to explain where it should be called. (especially you haven't call it yet in this PR). should it be called when the rum view scope ends?
There was a problem hiding this comment.
this approach follows common one,
in InteractionToNextViewMetricResolver and NetworkSettledMetricResolver
How do you think we should call it?
There was a problem hiding this comment.
I see, because I didn't find any call site of this function (because you haven't finish the whole feature yet), I am trying to understand where it should be called.
0xnm
left a comment
There was a problem hiding this comment.
I went through the production code so far and left some comments/questions. Didn't check test code yet.
|
Question: in the description it says part of the implementation has not been done yet, should this PR targets to a feature branch instead of develop branch then? |
ad51807 to
acf3ed2
Compare
I am gonna merge this PR after new version release, but there is no core changes so should be fine |
0xnm
left a comment
There was a problem hiding this comment.
nice work! I left some questions, but nothing blocking.
ec95a18 to
b2ae399
Compare
1e7d5f4 to
2778cc6
Compare
|
|
||
| fun slowFramesRate(viewEndedTimeStamp: Long): Double = when { | ||
| viewEndedTimeStamp - viewStartedTimeStamp <= minViewLifetimeThresholdNs -> 0.0 | ||
| totalFramesDurationNs > 0.0 -> slowFramesDurationNs.toDouble() / totalFramesDurationNs |
There was a problem hiding this comment.
to me it is not a rate, but ratio. Are we sure we are using a correct terminology?
There was a problem hiding this comment.
Gonna update event schema first, and then change this in a serate ticket
There was a problem hiding this comment.
This is a good point.
We followed the naming used by Apple here:
32297c3 to
d12bf4b
Compare
0xnm
left a comment
There was a problem hiding this comment.
I tentatively approve this PR, but we really need to decide on the lingvo rate vs ratio before the next release. The chosen terminology should be:
- easily understandable by the customers
- common in the industry (ideally the same wording used by the Play Store as well)
15449be to
8612f3c
Compare
fc2e06f to
f942dd6
Compare
What does this PR do?
Adds a SlowFrames listener that collects occurrences of jank frames during a view's lifetime.
This PR introduces the underlying logic and corresponding tests but does not yet integrate the functionality. The remaining integration will be completed in future tickets.
Review checklist (to be filled by reviewers)