-
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-7171 Implement the basic logic for interaction-to-next-view-metric #2417
RUM-7171 Implement the basic logic for interaction-to-next-view-metric #2417
Conversation
84f8e24
to
970eee7
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## feature/view-loading-times #2417 +/- ##
==============================================================
+ Coverage 69.87% 70.01% +0.14%
==============================================================
Files 770 775 +5
Lines 28559 28647 +88
Branches 4793 4805 +12
==============================================================
+ Hits 19955 20057 +102
+ Misses 7269 7265 -4
+ Partials 1335 1325 -10
|
970eee7
to
43a30e3
Compare
// we need to keep at least 10 entries to be able to calculate the metric for consecutive views that | ||
// are going to be created almost in the same time and will rely on the previous view interaction | ||
private const val MAX_ENTRIES = 10 |
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.
question/ What are the "views created almost in the same time"? Does it mean very short navigation through series of views OR a problem with instrumentation?
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.
yes...also for views that are already stopped but still request the metric for some view updates. I also want to prepare it for 2 active views later, this logic will support that scenario also.
internalLogger.log( | ||
InternalLogger.Level.WARN, | ||
InternalLogger.Target.MAINTAINER, | ||
{ "[ViewNetworkSettledMetric] No previous interaction found for this viewId:$viewId" } | ||
) |
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.
question/ Won't we always end up here for the initial view (ApplicationLaunch
)? If so, this log won't be actionable.
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.
totally true....I guess we can condition this log by checking if there's any interaction yet added in the map, if not this is the applaunch. Good point. Actually added a test about this but never thought to condition the log.
...dog/android/rum/internal/metric/interactiontonextview/InteractionToNextViewMetricResolver.kt
Show resolved
Hide resolved
...dog/android/rum/internal/metric/interactiontonextview/InteractionToNextViewMetricResolver.kt
Outdated
Show resolved
Hide resolved
43a30e3
to
d3a512d
Compare
What does this PR do?
In this PR we are adding the logic to compute and provide the
interaction-to-next-view
time.Captures the time interval in nano seconds from the last user interaction on the previous view to when the current view becomes visible. The last user interaction needs to match some criteria that will
be detailed below where we explain how this metric is computed.
Is Directly associated with the lifecycle of the view: the end part of this interval is
equal with the moment when the new view scope creation but under the hood this is triggered by a system tied to the internal view lifecycle events. More details below in the computation explanation.
Motivation
What inspired you to submit this pull request?
Additional Notes
Anything else we should know when reviewing?
Review checklist (to be filled by reviewers)