We are measuring performance of our Android application using stress testing. One of the measurements we gather is cpu usage via “dumpsys cpu”, and I noticed that the cpu usage for the application under test stays at a level 65% even when the app is entirely idle. The moment appium exits, the usage drops down to zero.
Does anyone have any idea why this happens or what I can do to measure the cpu usage? And why is it the application under test seeing the extra cpu usage? I’ve written this same test using just uiautomator and adb and don’t see the cpu penalties.
I spoke with Dan at the Appium Meetup last night and he suggested this is Appium’s fault for constantly pinging the application. Can we provide a capability to dial back just how often Appium is doing this?
Any thoughts on this, @bootstrap?
I recommend opening an issue on GitHub so the devs can resolve the problem. I wouldn’t expect to see a performance hit when the app is idle. A bunch of companies are promoting perf measurement with appium as a commercial service so this is kind of amazing.
Just for giggles, I tried this test again a simple application that consists of two buttons, and found the CPU didn’t go below 43%. I filed https://github.com/appium/appium/issues/4698 against this behavior.