I want to get the CPU utilization over time and turn the records into plot diagrams. I have surveyed some method for instant utilization, like shell command top
, dumpsys
.
Usage: top [ -m max_procs ] [ -n iterations ] [ -d delay ] [ -s sort_column ] [ -t ] [ -h ]
-m num Maximum number of processes to display.
-n num Updates to show before exiting.
-d num Seconds to wait between updates.
-s col Column to sort by (cpu,vss,rss,thr).
-t Show threads instead of processes.
-h Display this help screen.
~$ adb shell dumpsys cpuinfo
I try to customize the chart like TaskSpy
and add some details to analysis. It will be better to analysis on PC/MAC. Can I log the data periodically and efficiently by adb shell command?