summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVishal Bhoj <vishal.bhoj@linaro.org>2012-06-15 14:04:21 +0530
committerVishal Bhoj <vishal.bhoj@linaro.org>2012-06-15 21:49:13 +0530
commit13de2c24307f4d2d992bcca9b366f622fb99d74f (patch)
tree872619857745b9d589d3b5bf02402866b2fffafd
parent006e7f030b8ea92be880254c0a6d10b21868d5ff (diff)
downloadbenchmarks-13de2c24307f4d2d992bcca9b366f622fb99d74f.tar.gz
benchmarks: Adding Quadrant,antutu Updated Linpack
Quadrant: Quadrant is a CPU, I/O and 3D graphics benchmark. Antutu: AnTuTu Benchmark can run Memory Performance,CPU Integer Performance,CPU Floating point Performance,2D 3D Graphics Performance,SD card reading/writing speed,Database IO performance testing on the mobile phone Performance of the hardware to make score. Linpack: The LINPACK Benchmarks are a measure of a system’s floating point computing power. Signed-off-by: Vishal Bhoj <vishal.bhoj@linaro.org> Change-Id: I033ee27bcf8972238903e4ad04aba5ba5ef41a66
-rw-r--r--antutu/com.antutu.ABenchMark-1.apkbin0 -> 2675196 bytes
-rw-r--r--antutu/run.py89
-rw-r--r--linpack/run.py11
-rw-r--r--quadrant/com.aurorasoftworks.quadrant.ui.standard-1.apkbin0 -> 1455498 bytes
-rw-r--r--quadrant/run.py71
5 files changed, 167 insertions, 4 deletions
diff --git a/antutu/com.antutu.ABenchMark-1.apk b/antutu/com.antutu.ABenchMark-1.apk
new file mode 100644
index 0000000..8a6ac7c
--- /dev/null
+++ b/antutu/com.antutu.ABenchMark-1.apk
Binary files differ
diff --git a/antutu/run.py b/antutu/run.py
new file mode 100644
index 0000000..832e5b4
--- /dev/null
+++ b/antutu/run.py
@@ -0,0 +1,89 @@
+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__))+"/antutu_" + 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.antutu.ABenchMark-1.apk'
+ device.installPackage(srcfile)
+
+ #clean the enviroment
+ init()
+
+ device.startActivity(component='com.antutu.ABenchMark/.ABenchMarkStart')
+ MonkeyRunner.sleep(10)
+ device.shell("am kill-all")
+ MonkeyRunner.sleep(2)
+ device.press("KEYCODE_DPAD_DOWN", MonkeyDevice.DOWN_AND_UP)
+ device.press("KEYCODE_DPAD_DOWN", MonkeyDevice.DOWN_AND_UP)
+ device.press("KEYCODE_DPAD_DOWN", MonkeyDevice.DOWN_AND_UP)
+ device.press("KEYCODE_DPAD_DOWN", MonkeyDevice.DOWN_AND_UP)
+ device.press("KEYCODE_DPAD_DOWN", MonkeyDevice.DOWN_AND_UP)
+ device.press("KEYCODE_DPAD_DOWN", MonkeyDevice.DOWN_AND_UP)
+ device.press("KEYCODE_DPAD_DOWN", MonkeyDevice.DOWN_AND_UP)
+ device.press("KEYCODE_DPAD_DOWN", MonkeyDevice.DOWN_AND_UP)
+ device.press("KEYCODE_DPAD_CENTER",MonkeyDevice.DOWN_AND_UP)
+ device.press("KEYCODE_DPAD_RIGHT", MonkeyDevice.DOWN_AND_UP)
+ device.press("KEYCODE_DPAD_DOWN", MonkeyDevice.DOWN_AND_UP)
+ device.press("KEYCODE_DPAD_DOWN", MonkeyDevice.DOWN_AND_UP)
+ device.press("KEYCODE_DPAD_DOWN", MonkeyDevice.DOWN_AND_UP)
+ device.press("KEYCODE_DPAD_DOWN", MonkeyDevice.DOWN_AND_UP)
+ device.press("KEYCODE_DPAD_DOWN", MonkeyDevice.DOWN_AND_UP)
+ device.press("KEYCODE_DPAD_DOWN", MonkeyDevice.DOWN_AND_UP)
+ device.press("KEYCODE_DPAD_DOWN", MonkeyDevice.DOWN_AND_UP)
+ device.press("KEYCODE_DPAD_RIGHT", MonkeyDevice.DOWN_AND_UP)
+ MonkeyRunner.sleep(1)
+ device.press("KEYCODE_DPAD_CENTER",MonkeyDevice.DOWN_AND_UP)
+
+ print "Running Antutu"
+ MonkeyRunner.sleep(360)
+
+ # TODO
+ # There is a hardcoding specific to panda currently in touch event
+ # for Antutu.Since that button could never be focused.
+ # The plan to make it functional for othe board would
+ # be by reading the board type and then load the location
+ # of the touch for that resolution.
+
+ device.touch(1805, 80, 'DOWN_AND_UP')
+ MonkeyRunner.sleep(1)
+ take_snapshot(device)
+
+ device.removePackage("com.antutu.ABenchMark")
+
+
+if __name__ == '__main__':
+ main()
diff --git a/linpack/run.py b/linpack/run.py
index 3463222..4879a9a 100644
--- a/linpack/run.py
+++ b/linpack/run.py
@@ -34,8 +34,9 @@ def main():
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")
+ 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.greenecomputing.linpack-1.apk'
device.installPackage(srcfile)
@@ -45,6 +46,8 @@ def main():
device.startActivity(component='com.greenecomputing.linpack/.Linpack')
MonkeyRunner.sleep(5)
+ device.shell("am kill-all")
+ MonkeyRunner.sleep(2)
device.press("KEYCODE_DPAD_UP", MonkeyDevice.DOWN_AND_UP)
device.press("KEYCODE_DPAD_UP", MonkeyDevice.DOWN_AND_UP)
device.press("KEYCODE_DPAD_DOWN", MonkeyDevice.DOWN_AND_UP)
@@ -55,7 +58,7 @@ def main():
device.press("KEYCODE_DPAD_CENTER",MonkeyDevice.DOWN_AND_UP)
print "Running Linpack_ST"
- MonkeyRunner.sleep(5)
+ MonkeyRunner.sleep(10)
take_snapshot(device)
device.press("KEYCODE_DPAD_UP",MonkeyDevice.DOWN_AND_UP)
@@ -70,7 +73,7 @@ def main():
MonkeyRunner.sleep(1)
device.press("KEYCODE_DPAD_CENTER",MonkeyDevice.DOWN_AND_UP)
print "Running Linpack_MT"
- MonkeyRunner.sleep(5)
+ MonkeyRunner.sleep(10)
take_snapshot(device)
device.removePackage("com.greenecomputing.linpack")
diff --git a/quadrant/com.aurorasoftworks.quadrant.ui.standard-1.apk b/quadrant/com.aurorasoftworks.quadrant.ui.standard-1.apk
new file mode 100644
index 0000000..e1cdd56
--- /dev/null
+++ b/quadrant/com.aurorasoftworks.quadrant.ui.standard-1.apk
Binary files differ
diff --git a/quadrant/run.py b/quadrant/run.py
new file mode 100644
index 0000000..e12f9a3
--- /dev/null
+++ b/quadrant/run.py
@@ -0,0 +1,71 @@
+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__))+"/quadrant_" + 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.aurorasoftworks.quadrant.ui.standard-1.apk'
+ device.installPackage(srcfile)
+
+ #clean the enviroment
+ init()
+
+ device.startActivity(component='com.aurorasoftworks.quadrant.ui.standard/.QuadrantStandardLauncherActivity')
+ MonkeyRunner.sleep(2)
+ device.shell("am kill-all")
+ MonkeyRunner.sleep(2)
+ device.press("KEYCODE_DPAD_DOWN",MonkeyDevice.DOWN_AND_UP)
+ device.press("KEYCODE_DPAD_DOWN",MonkeyDevice.DOWN_AND_UP)
+ device.press("KEYCODE_DPAD_CENTER",MonkeyDevice.DOWN_AND_UP)
+ MonkeyRunner.sleep(5)
+ device.press("KEYCODE_DPAD_UP",MonkeyDevice.DOWN_AND_UP)
+ device.press("KEYCODE_DPAD_UP",MonkeyDevice.DOWN_AND_UP)
+ device.press("KEYCODE_DPAD_UP",MonkeyDevice.DOWN_AND_UP)
+ device.press("KEYCODE_DPAD_UP",MonkeyDevice.DOWN_AND_UP)
+ device.press("KEYCODE_DPAD_DOWN",MonkeyDevice.DOWN_AND_UP)
+ device.press("KEYCODE_DPAD_CENTER",MonkeyDevice.DOWN_AND_UP)
+
+ print "Running Quadrant"
+ MonkeyRunner.sleep(120)
+ device.press("KEYCODE_DPAD_DOWN",MonkeyDevice.DOWN_AND_UP)
+ device.press("KEYCODE_DPAD_RIGHT",MonkeyDevice.DOWN_AND_UP)
+ device.press("KEYCODE_DPAD_CENTER",MonkeyDevice.DOWN_AND_UP)
+ MonkeyRunner.sleep(30)
+ take_snapshot(device)
+ device.removePackage("com.aurorasoftworks.quadrant.ui.standard")
+
+
+if __name__ == '__main__':
+ main()