0

I'm reading CPU usage details of my app using dumpsys cpuinfo command, however, it seems like its not updating the information. For example, the output is as follow:

CPU usage from 886396ms to 613049ms ago:

Which means that the last update was around 613 seconds ago. That doesn't make sense. It updates these information on the phone in terms of a few seconds.

My watch is connected through usb to my laptop. I'm running the following command.

adb shell dumpsys cpuinfo

What I am doing wrong ?

utengr
  • 3,225
  • 3
  • 29
  • 68

1 Answers1

1

I don't think you are doing anything wrong.

This interval isn't surprising to me for two reasons: (1) A watch's CPU load is pretty stable over long intervals of time, potentially quiescent for hours, so long intervals make more sense than short intervals. And (2) battery life is very very important so you want to minimize sampling, say perhaps once every 30 to 60 sec.

You might be able to force a smaller sampling time but I have to wonder if it's really necessary.

Taylor Kidd
  • 1,463
  • 1
  • 9
  • 11
  • Can you tell me how to force a small sampling time ? I want to see the cpu usage of my app. My app shows 0 % due to this long intervals. I have to somehow force an update in order to get the usage of my app. – utengr Nov 21 '16 at 13:33
  • 30-60 seconds is fine with me but in this case, its not updated for a few minutes which is strange. – utengr Nov 21 '16 at 13:34
  • I can't help you there. I'm not familiar with the API and don't have time at the moment to look it over. – Taylor Kidd Nov 21 '16 at 20:48