This repository was archived by the owner on Jan 5, 2023. It is now read-only.
Add reporting when the app is fully drawn to the framework#351
Merged
tiembo merged 8 commits intogoogle:masterfrom Jun 25, 2020
benbaxter:github-fully-drawn
Merged
Add reporting when the app is fully drawn to the framework#351tiembo merged 8 commits intogoogle:masterfrom benbaxter:github-fully-drawn
tiembo merged 8 commits intogoogle:masterfrom
benbaxter:github-fully-drawn
Conversation
The Feed is the main view that launches when the app opens (after onboarding). Once the feed items are fetched, we post reporting fully drawn until after the recycler view finishes drawing the items. Activity#reportFullyDrawn() prints a log statement that looks like this: I/ActivityTaskManager: Fully drawn com.google.samples.apps.iosched/.ui.MainActivity: +3s493ms Reporting fulling drawn from onboarding and deeplinking into SessionDetails will be in follow up CLs. Bug: 158839978 Test: Manually check for the log statement from the framework Change-Id: I5d4f6f2f93aaa7f0edcc12442d6b30d87dc76107
When a user opens a deeplink into the session details, we should report when the screen has been fully drawn. Activity#reportFullyDrawn() prints a log statement that looks like this: I/ActivityTaskManager: Fully drawn com.google.samples.apps.iosched/.ui.sessiondetail.SessionDetailActivity: +516ms Change-Id: Ib2b8ad08a6a7b8a7459e9412f2ebb180991a3f0c
Depending on the time, we have several entrance onboarding screens presented to the user. The content in hardcoded so we can report fully drawn as soon as the views are rendered. Activity#reportFullyDrawn() prints a log statement that looks like this: I/ActivityTaskManager: Fully drawn com.google.samples.apps.iosched/.ui.onboarding.OnboardingActivity: +3s87ms Change-Id: I1295ae041560da539475630726bb0ce71aa470b4
Change-Id: I2d53bba09839548df4eabcdcae060d8398b98327
Change-Id: I2955ae253ac49c2d8478263ea05ebc8e3c98f648
jdkoren
reviewed
Jun 18, 2020
Collaborator
jdkoren
left a comment
There was a problem hiding this comment.
Part of me wonders if we need to go through ViewModels to report this since it's specific to the UI/platform and doesn't really impact any business logic. Would it be enough to just rely on doOnLayout in our activities?
mobile/src/main/java/com/google/samples/apps/iosched/ui/sessiondetail/SessionDetailActivity.kt
Outdated
Show resolved
Hide resolved
...main/java/com/google/samples/apps/iosched/ui/sessiondetail/SessionDetailActivityViewModel.kt
Outdated
Show resolved
Hide resolved
...src/main/java/com/google/samples/apps/iosched/ui/onboarding/WelcomePostConferenceFragment.kt
Outdated
Show resolved
Hide resolved
Change-Id: Ifb619989923890c6d453f416659c81fabe10105d
Change-Id: I36b4252fa779a2479d8d9106d3a6ea28888e0ef9
Member
Author
Good point! I removed the view model middle layer. Originally I thought multiple views would report when they had finished drawing but since |
jdkoren
reviewed
Jun 19, 2020
mobile/src/main/java/com/google/samples/apps/iosched/ui/MainActivity.kt
Outdated
Show resolved
Hide resolved
...src/main/java/com/google/samples/apps/iosched/ui/onboarding/WelcomePostConferenceFragment.kt
Outdated
Show resolved
Hide resolved
mobile/src/main/java/com/google/samples/apps/iosched/ui/sessiondetail/SessionDetailActivity.kt
Outdated
Show resolved
Hide resolved
Change-Id: Id7402173643b953526d2c69923330df49100cae2
jdkoren
approved these changes
Jun 25, 2020
tiembo
approved these changes
Jun 25, 2020
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Invoking
Activity#reportFullyDrawn()once the data has been loaded and the screen has been rendered to the user.The entry points into the app are the OnboardingActivity, MainActivity, and SessionDetailsActvitiy. Each of these report when they have been fully drawn independently to the framework. The Android framework prints a log statement as follows:
This is used for measuring startup time and is a helpful signal when diagnosing startup performance issues. Check out the vitals documentation for more about the usage of
reportFullyDrawn().