Forum Discussion
10 Replies
- rraghvani
Champion Level 3
See https://stackoverflow.com/questions/14042687/cpu-usage-per-application-in-android/19889090#19889090, it mentions the command adb shell top -m 10
Once you've got the correct command to get the information you require, you can then use that, in the sample script that I provided above.
- David91Frequent Contributor
Can I also use this adb command in powershell?
David91_0-1670415864267.png
- rraghvani
Champion Level 3
- David91Frequent Contributor
Thank you but I would need to find out using a script
- rraghvani
Champion Level 3
You can invoke a PowerShell script to return the information you need. For example,
Get-CimInstance -ClassName Win32_Process -Filter "Name='TestComplete.exe'"Will return,
rraghvani_0-1670340088096.png
Script will look so,
rraghvani_1-1670340542237.png
I'm assuming there will be something similar for Android, using adb?
- David91Frequent Contributor
Yes i use ADB emulator for tests
- AlexKarasCommunity Hero
Hi,
https://www.repeato.app/how-to-automatically-check-memory-usage-of-you-app/ might provide you with possible solution.
- David91Frequent Contributor
i try it.. but return .. ReferenceError: deviceConnector is not defined
- rraghvani
Champion Level 3
Yes you can, providing your path is correctly setup
rraghvani_1-1670417711097.png
Use whatever you find easier. I just prefer PowerShell over Command Prompt
- rraghvani
Champion Level 3
Did you do an internet search for the error?