10

I have followed the guide for Profiling Android UI Performance

I run the following cmd: /usr/local/Cellar/android-sdk/24.4.1_1/platform-tools/systrace/systrace.py --time=10 -o trace.html shred gfx view -a com.navigation.

I am able to get a trace output. But the Js and Native Modules Threads are not available like described in the guide.

Here is an example of the generated trace. enter image description here

I have tried to run the trace both with dev=false as described in the guide and with dev=true as mentioned in this answer but non is working

I'm currently using version 0.28.0. I have not tried to use systrace before in the project, so don't know if it ever worked.

Any ideas why this is not shown is much appreciated.

Community
  • 1
  • 1
René Madsen
  • 213
  • 2
  • 10
  • `systrace.py` file has been opened when I ran this command, But i didn't get any link to `systrace`. Can You guide me on how to collect the systrace? – ThinkAndCode Feb 04 '20 at 09:13
  • Can you please look into this [question](https://stackoverflow.com/questions/60053769/react-native-how-to-collect-the-systrace-in-android) – ThinkAndCode Feb 05 '20 at 04:04

4 Answers4

1

com.navigation app using Js and Native Modules?

If you are not using these modules in your app, it will not display in your systrace.

Please refer the following link how to add natvie module & js to app https://apimirror.com/react_native/native-modules-android

Lava Sangeetham
  • 2,943
  • 4
  • 38
  • 54
0

Make sure that your package name, as specified by the -a option is correct. I had a similar issue and found that I wasn't listing the package name at all which was keeping my trace from showing any useful information.

eremzeit
  • 4,055
  • 3
  • 30
  • 32
-1

Have you tried using systrace from the Device Monitor in Android Studio? There you have many options for tracing:

enter image description here

For opening the trace in newer verisons of Chrome you must include this script in the trace.html:

<script src="https://rawgit.com/MaxArt2501/object-observe/master/dist/object-observe.min.js"></script>
methusa
  • 76
  • 1
  • 9
-1

Add dalvik --no-fix-threads to your command.

guy.gc
  • 3,359
  • 2
  • 24
  • 39