0

I am using this command to capture systrace from my pixel3

python systrace.py -a "com.my.sampleApp" -o trace.html

I am able to see my Application's traces(UIThread, Render Thread ....) in the systrace captured but i am not able to see custom events which i have planted in my code

I followed steps from here - https://developer.android.com/topic/performance/tracing/custom-events#managed-code

I can see the custom events when i do cpu profiling in Android studio but cant see custom events in systrace

Rishi
  • 21
  • 4

1 Answers1

0

Can you try -a "*", which should match all apps? This is supported on Android API Level 28 and since you use a Pixel 3 you should be good.

Note that the systrace.py command line tools is deprecated. For devices on API Level 28 and later you can try Perfetto and view the trace in the new web UI.

Of course you can always use Android Studio profilers, which you mentioned displays the custom events correctly. In this particular case, is there anything missing from Android Studio that prompted you to use systrace instead?

Yi Yang
  • 421
  • 2
  • 6
  • Thanks for Answer, i also found a search box to find my custom events easily. I am facing a new challenge for automating Systrace cases. can you please to answer this - https://stackoverflow.com/questions/66625833/how-to-capture-android-systrace-from-my-automation-script @Yi Yang – Rishi Mar 15 '21 at 08:41