Using activity monitor with appium

Hey guys,

I’ve been googling around a looking at some posts and i cant find any way to get the monitor activity instrument working with Appium. I’m currently trying to execute a appium server with the --tracetemplate and --trace-dir commands.

By just running the --trace-dir command it is able to generate a .trace of about 24mb after i close the appium server. I cant open this .trace file with the instruments tool. Once i give it the --tracetemplate the automation will start the app but wont execute the test, and ends up failing after a while. Here’s a gist that might help find the issue. While its trying to start the script the .trace files are being generated. I’m not a expert with appium so its kind of hard to understand what exactly is failing.

I’ve also ran the activity monitor manually and executed the test script and it seemed to work fine. However this isn’t the ideal solution since i have to do everything programmatically. So why cant i execute it along side appium? if there is a alternative way to get all of this information (memory usage, cpu usage, battery usage etc.) about the app im testing through autmation it’s also appreciated.

Any help/advice is appreciated,

Thanks in advance!

I’ll leave another gist where i let it run until it crashes.

only memory usage makes sense. all other will be swallowed by Appium :slight_smile:

give a try with command line (maybe helps) - https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man1/instruments.1.html