Add asmjs-apps to awfy driver.

This commit is contained in:
David Anderson 2013-05-07 16:34:04 -07:00 коммит произвёл Mozilla
Родитель e354afbe49
Коммит 9c1af72a66
1 изменённых файлов: 29 добавлений и 1 удалений

Просмотреть файл

@ -74,6 +74,33 @@ class AsmJSMicro(Benchmark):
tests.append({ 'name': '__total__', 'time': total })
return tests
class AsmJSApps(Benchmark):
def __init__(self):
super(AsmJSApps, self).__init__('asmjs-apps', 'asmjs-apps')
def benchmark(self, shell, env, args):
full_args = ['python', 'harness.py', shell, '--'] + args
print(' '.join(full_args))
p = subprocess.Popen(full_args, stdout=subprocess.PIPE, env=env)
output = p.communicate()[0]
print(output)
return self.parse(output)
def parse(self, output):
total = 0.0
tests = []
for line in output.splitlines():
m = re.search("(.+) - (\d+(\.\d+)?)", line)
if not m:
continue
name = m.group(1)
score = m.group(2)
total += float(score)
tests.append({ 'name': name, 'time': score })
tests.append({ 'name': '__total__', 'time': total })
return tests
class Octane(Benchmark):
def __init__(self):
super(Octane, self).__init__('octane', 'octane')
@ -157,5 +184,6 @@ Benchmarks = [AsmJSMicro(),
SunSpider('ss', 'SunSpider', 'sunspider-0.9.1', 20),
SunSpider('kraken', 'kraken', 'kraken-1.1', 5),
SunSpider('misc', 'Assorted', 'assorted', 3),
Octane()
Octane(),
AsmJSApps(),
]