I want to look at the cpu usage of my app in Android. For which, I used both top and dumpsys cpuinfo. I calculated the average of 5 minutes for top command (1 second interval between cpu measurements). For example, once I got 19% for my app over 5 minutes but next time I got 17% over 5 minutes. I did the same with dumpsys. Their results are slightly different.
The main question is: Is one more accurate than the other one ?
I need high precision for the CPU usage.
Moreover, can I change the timespan for dumpsys cpuinfo such that it gives the average over last 5 minutes ?
Update: Its not a duplicate question like this one.