Skip to content
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

Merged
merged 24 commits into from
Jul 18, 2022
Merged

Add tracing and JankStats #145

merged 24 commits into from
Jul 18, 2022

Conversation

keyboardsurfer
Copy link
Member

Enable performance monitoring with JankStats and improve inspection results with Trace sections for some parts of the app.

keyboardsurfer and others added 18 commits May 20, 2022 16:34
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
This isn't the thing a developer should be focusing on when first
opening the file. So moving it further down in the composable.
@JolandaVerhoef JolandaVerhoef self-requested a review July 5, 2022 09:21
* Introduce gradle plugin for firebase perf
* Create TrackScrollJank composable to mask tracking code
@JolandaVerhoef
Copy link
Collaborator

This branch has merge conflicts, can you resolve those?

@keyboardsurfer
Copy link
Member Author

All resolved.

Copy link
Collaborator

@JolandaVerhoef JolandaVerhoef left a 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?

@keyboardsurfer
Copy link
Member Author

I agree with creating a learning journey for the performance additions and have tracked it in #181.

@JolandaVerhoef
Copy link
Collaborator

Please wait with merging until Don has also reviewed!

Copy link
Collaborator

@dturner dturner left a 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.

@keyboardsurfer
Copy link
Member Author

Thanks for the review, @dturner. I have added your change requests to #181, which we'll address ASAP.
Is it okay to land this CL and promise to work on the learning journey next?

Copy link
Collaborator

@dturner dturner left a 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.

@keyboardsurfer
Copy link
Member Author

That's what the issue is for. I've also added it to my internal task tracker.

@keyboardsurfer keyboardsurfer merged commit ffd0ba9 into main Jul 18, 2022
@keyboardsurfer keyboardsurfer deleted the bw/initialMetrics branch October 31, 2022 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants