diff options
author | Vishal Bhoj <vishal.bhoj@linaro.org> | 2012-06-15 14:04:21 +0530 |
---|---|---|
committer | Vishal Bhoj <vishal.bhoj@linaro.org> | 2012-06-15 21:49:13 +0530 |
commit | 13de2c24307f4d2d992bcca9b366f622fb99d74f (patch) | |
tree | 872619857745b9d589d3b5bf02402866b2fffafd /quadrant | |
parent | 006e7f030b8ea92be880254c0a6d10b21868d5ff (diff) | |
download | benchmarks-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
Diffstat (limited to 'quadrant')
-rw-r--r-- | quadrant/com.aurorasoftworks.quadrant.ui.standard-1.apk | bin | 0 -> 1455498 bytes | |||
-rw-r--r-- | quadrant/run.py | 71 |
2 files changed, 71 insertions, 0 deletions
diff --git a/quadrant/com.aurorasoftworks.quadrant.ui.standard-1.apk b/quadrant/com.aurorasoftworks.quadrant.ui.standard-1.apk Binary files differnew file mode 100644 index 0000000..e1cdd56 --- /dev/null +++ b/quadrant/com.aurorasoftworks.quadrant.ui.standard-1.apk 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() |