summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVishal Bhoj <vishal.bhoj@linaro.org>2012-06-15 16:49:50 +0530
committerVishal Bhoj <vishal.bhoj@linaro.org>2012-06-18 12:27:32 +0530
commitff1690af89b0b26ef5b7d956c54c985bee468ea0 (patch)
treeb9f3dfb155a62b98b2c366520b11b38eb679f5cc
parent13de2c24307f4d2d992bcca9b366f622fb99d74f (diff)
downloadbenchmarks-ff1690af89b0b26ef5b7d956c54c985bee468ea0.tar.gz
benchmarks: add andebench
AndEbench: The AndEBenchâ„¢ benchmark provides a standardized, industry-accepted method of evaluating Android platform performance. Signed-off-by: Vishal Bhoj <vishal.bhoj@linaro.org>
-rw-r--r--andebench/com.eembc.coremark-1.apkbin0 -> 1203767 bytes
-rw-r--r--andebench/run.py58
2 files changed, 58 insertions, 0 deletions
diff --git a/andebench/com.eembc.coremark-1.apk b/andebench/com.eembc.coremark-1.apk
new file mode 100644
index 0000000..322cd45
--- /dev/null
+++ b/andebench/com.eembc.coremark-1.apk
Binary files differ
diff --git a/andebench/run.py b/andebench/run.py
new file mode 100644
index 0000000..bcf4355
--- /dev/null
+++ b/andebench/run.py
@@ -0,0 +1,58 @@
+import os,sys,time
+from subprocess import call
+from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice
+
+
+COUNT = 0;
+
+def gen_png_no():
+ global COUNT
+ COUNT = COUNT + 1
+ return str(COUNT)
+
+def take_snapshot(device):
+ result = device.takeSnapshot()
+ result.writeToFile(os.path.realpath(os.path.dirname(__file__))+"/andebench_" + gen_png_no() +".png","png")
+
+def init():
+ os.system("rm" + os.path.realpath(os.path.dirname(__file__)) + "/*.png 2> /dev/null")
+
+def main():
+
+ if len(sys.argv) < 2:
+ print "please input the device id"
+ sys.exit(0)
+
+ #connect the device
+ timeout_val = 5
+ for dev_id in sys.argv[1:]:
+ device = MonkeyRunner.waitForConnection( timeout = timeout_val,deviceId = dev_id )
+
+ if not device:
+ print "connect to the device timeout"
+ sys.exit(0)
+ else:
+ print "connect to the device: " + dev_id
+
+ device.shell("echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor")
+ device.shell("echo performance > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor")
+ srcfile = os.path.realpath(os.path.dirname(__file__))+'/com.eembc.coremark-1.apk'
+ device.installPackage(srcfile)
+
+ #clean the enviroment
+ init()
+
+ device.startActivity(component='com.eembc.coremark/.tabs')
+ MonkeyRunner.sleep(2)
+ device.shell("am kill-all")
+ MonkeyRunner.sleep(2)
+ device.press("KEYCODE_DPAD_DOWN",MonkeyDevice.DOWN_AND_UP)
+ device.press("KEYCODE_DPAD_CENTER",MonkeyDevice.DOWN_AND_UP)
+ print "Running Andeebench"
+ MonkeyRunner.sleep(60)
+ take_snapshot(device)
+ device.removePackage("com.eembc.coremark")
+
+
+if __name__ == '__main__':
+ main()