You can invoke a PowerShell script to return the information you need. For example,
Get-CimInstance -ClassName Win32_Process -Filter "Name='TestComplete.exe'"
Script will look so,
I'm assuming there will be something similar for Android, using adb?
https://www.repeato.app/how-to-automatically-check-memory-usage-of-you-app/ might provide you with possible solution.
/Alex [Community Champion]
[Community Champions] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Champions]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.
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.