-
Notifications
You must be signed in to change notification settings - Fork 625
Fireperf: use the new class FrameMetricsRecorder
in AppStateMonitor
and FragmentStateMonitor
#3683
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
Conversation
Coverage Report 1Affected Products
Test Logs
Notes |
Size Report 1Affected Products
Test Logs
Notes |
929d70e
to
ef812f9
Compare
FrameMetricsRecorder
in AppStateMonitor
and FragmentStateMonitor
…ts follow unit test practices
5cca75f
to
b27349d
Compare
…d when the flags are toggled at runtime.
firebase-perf/src/main/java/com/google/firebase/perf/application/AppStateMonitor.java
Outdated
Show resolved
Hide resolved
firebase-perf/src/main/java/com/google/firebase/perf/application/AppStateMonitor.java
Outdated
Show resolved
Hide resolved
firebase-perf/src/main/java/com/google/firebase/perf/application/AppStateMonitor.java
Show resolved
Hide resolved
firebase-perf/src/main/java/com/google/firebase/perf/application/AppStateMonitor.java
Show resolved
Hide resolved
@@ -15,6 +15,7 @@ | |||
package com.google.firebase.perf.application; |
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.
The behavior of AppStateMonitor has changed quite a bit. I'm surprised the tests haven't changed barely at all. I feel like we're probably missing tests (e.g. testing new behaviors), as well as having coverage for the behavior changes that have happened (some things happen in different points of the activity's lifecycle)
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.
The only lifecycle change is reverting the activity screen trace that is from onResume
-> onPostPaused
to onStart
-> onStop
. onStart
-> onStop
was the original behavior before attempting to fix the b/210055697 that started all of this in the first place. That's why there's no new tests for that.
firebase-perf/src/test/java/com/google/firebase/perf/application/FragmentStateMonitorTest.java
Outdated
Show resolved
Hide resolved
…mended by google style guide.
firebase-perf/src/main/java/com/google/firebase/perf/application/AppStateMonitor.java
Outdated
Show resolved
Hide resolved
@@ -15,6 +15,7 @@ | |||
package com.google.firebase.perf.application; |
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.
The only lifecycle change is reverting the activity screen trace that is from onResume
-> onPostPaused
to onStart
-> onStop
. onStart
-> onStop
was the original behavior before attempting to fix the b/210055697 that started all of this in the first place. That's why there's no new tests for that.
/retest |
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 on checks green!
With
FrameMetricsRecorder
taking care of managingFrameMetricsAggregator
, the need forAppStateMonitor
to use FrameMetricsAggregator is gone. This PR is to make change to AppStateMonitor to use theFrameMetricsRecorder
for measuring frame metrics.As a part of this, the lifecycle event used to measure the start and stop of an activity screen trace is aligned to make it work for all versions of Android.