-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Add tracing and JankStats #145
Conversation
Currently tracing sync and main navigation.
Change-Id: I420cfaf826fee770975164147c29280a760bb5ff
Change-Id: I3b038a9bbc6eed9b21343aa0fd75c044049386a4
…election Change-Id: I1b7820ebd4d9e16f0aa4d576c250e5aa137706c0
Change-Id: I5d4fddb9fb36a40ae9864edfa6eb4850d8f8d306
Change-Id: I8a5d90188b52ec1c11eec1c2724dda1332615768
Change-Id: I4ee60188fffdad4678f0f5a0ee4ef47031a1d61f
Change-Id: Idcab0faa2e9b4cc9986064f45217cab101843697
Change-Id: Ia371c564e4ff723fbeaca741d278174bd6db0dd8
Change-Id: Icb85b612b1aa45fc5579acea9358a2da70de15d6
…nto bw/initialMetrics
This isn't the thing a developer should be focusing on when first opening the file. So moving it further down in the composable.
9b66621
to
6509b6a
Compare
app/src/main/java/com/google/samples/apps/nowinandroid/MainActivity.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/google/samples/apps/nowinandroid/ui/NiaApp.kt
Outdated
Show resolved
Hide resolved
...-foryou/src/main/java/com/google/samples/apps/nowinandroid/feature/foryou/AuthorsCarousel.kt
Outdated
Show resolved
Hide resolved
* Introduce gradle plugin for firebase perf * Create TrackScrollJank composable to mask tracking code
This branch has merge conflicts, can you resolve those? |
All resolved. |
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.
We're adding a lot of production code here that might be unfamiliar to developers. Can we consider adding a learning journey, pointing to all these different pieces of the puzzle, and then point to the learning journey from within code comments?
...-foryou/src/main/java/com/google/samples/apps/nowinandroid/feature/foryou/AuthorsCarousel.kt
Outdated
Show resolved
Hide resolved
...ure-foryou/src/main/java/com/google/samples/apps/nowinandroid/feature/foryou/ForYouScreen.kt
Outdated
Show resolved
Hide resolved
I agree with creating a learning journey for the performance additions and have tracked it in #181. |
d9bf5b9
to
7c2b584
Compare
Please wait with merging until Don has also reviewed! |
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.
As @JolandaVerhoef already suggested, please add supporting documentation for this plugin/feature, either by adding to the existing README or (better) start a performance tracking learning journey.
The docs should include:
- The events which are being monitored
- How the events are currently recorded, and how they could be sent to a Firebase backend (see below)
- An example output, what the output means and potentially how to address jank. For example, when running the app on the emulator I see the following output:
V/NiA Jank: FrameData(frameStartNanos=13037274863989, frameDurationUiNanos=286913934, frameDurationCpuNanos=293708517, frameOverrunNanos=277093643, isJank=true, states=[Navigation: for_you_route])
But, as a layman, I'm not sure what this is telling me, or what (if anything) I should do about it.
I'd also like to see a prod
configuration which switches the event recording from using Log
to using a real backend, although this can be done in a follow up PR.
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, sure, as long as the docs don't get forgotten about.
That's what the issue is for. I've also added it to my internal task tracker. |
Enable performance monitoring with JankStats and improve inspection results with Trace sections for some parts of the app.