square / workflow-kotlin

A Swift and Kotlin library for making composable state machines, and UIs driven by those state machines.
https://square.github.io/workflow
Apache License 2.0
1.02k stars 101 forks source link

Adopt Android Perfetto and/or `android.os.Trace` #756

Open rjrjr opened 4 years ago

rjrjr commented 4 years ago

Quoth @zach-klippenstein:

TIL about Perfetto in Android 10, it's integration with android.os.Trace and we should probably replace TracingDiagnosticListener with one or both of those things.

JustinDSN commented 4 years ago

This sounds similar to what @AquaGeek added via square/workflow#1083.

zach-klippenstein commented 4 years ago

It is. We've actually had something similar for a long time, that generates files that Chrome can open and that it uses for its own tracing (Android used these too) - or they did until recently, apparently. This issue is partially to upgrade that tooling to the latest and greatest, and consider integrating with the OS itself. Although I don't think the OS facilities in Android has exact parity with os_signpost, so not sure that makes sense. Need to try it and see.

Fun fact: our diagnostic APIs have leapfrogged each other a couple times: square/workflow#129, square/workflow#343.

zach-klippenstein commented 4 years ago

This should not block 1.0. I think the 1.0 blocker should be getting TracingDiagnosticListener out of the main module, and then cleaning up the DiagnosticListener API. Then the tracing/Perfetto stuff can all be done separately. Not sure it even makes sense to have the tracing tools in the main repo, they're all built on that DL API which is public.

JustinDSN commented 4 years ago

This should not block 1.0. I think the 1.0 blocker should be getting TracingDiagnosticListener out of the main module, and then cleaning up the DiagnosticListener API. Then the tracing/Perfetto stuff can all be done separately. Not sure it even makes sense to have the tracing tools in the main repo, they're all built on that DL API which is public.

cc: @dhavalshreyas, and @AquaGeek for visibility into Zach's thoughts on debugging / tracing and 1.0.

rjrjr commented 4 years ago

Blocker tracked in square/workflow#1177

zach-klippenstein commented 4 years ago

https://medium.com/androiddevelopers/whats-new-in-android-studio-system-trace-5841465c5935