Home > Enterprise >  CPU Profiler Android Studio
CPU Profiler Android Studio

Time:07-28

I am facing a problem with my Android App.

My application get a microphone by using Native Code in C and other services like MQTT. But actually my app use a lot of CPU usage and a notification request the user to set my app on a deep sleep mode.

So I'm searching what part of my code use as much CPU and when I start CPU Profiler I see some Thread that use a lot of CPU but I don't know what part of my code it is.

enter image description here

My question is : How to know what Thread indicate in the CPU Profiler, corresponds to which service or thread of my code.

Thanks in advance.

CodePudding user response:

I solved my problem basically by setting a name to my thread like that :

thread.setName("MainActivity_Thread");

This allow to display the name of the thread to the CPU Profiler.

  • Related