diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-12-16 11:27:16 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-12-16 11:29:30 -0800 |
commit | f8b509fc031eb9fd06856c42275dd5103924a713 (patch) | |
tree | a88ec0d088bf50de2f4f253e045d94a194e291f4 /tests/test_benchmark.py | |
parent | 191d2a9f2ec271fd88ccd9639e47cb0932658ac1 (diff) |
add v8 benchmarker
Diffstat (limited to 'tests/test_benchmark.py')
-rw-r--r-- | tests/test_benchmark.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/test_benchmark.py b/tests/test_benchmark.py index 233ffb48..303141c4 100644 --- a/tests/test_benchmark.py +++ b/tests/test_benchmark.py @@ -62,8 +62,9 @@ class ClangBenchmarker(Benchmarker): return self.parent.run_native(self.filename, args) class JSBenchmarker(Benchmarker): - def __init__(self, name, extra_args=[]): + def __init__(self, name, engine, extra_args=[]): self.name = name + self.engine = engine self.extra_args = extra_args def build(self, parent, filename, args, shared_args, emcc_args, native_args, native_exec): @@ -91,13 +92,14 @@ process(sys.argv[1]) assert os.path.exists(filename + '.js'), 'Failed to compile file: ' + output[0] def run(self, args): - return run_js(self.filename + '.js', engine=JS_ENGINE, args=args, stderr=PIPE, full_output=True) + return run_js(self.filename + '.js', engine=self.engine, args=args, stderr=PIPE, full_output=True) # Benchmarkers benchmarkers = [ ClangBenchmarker('clang'), - JSBenchmarker('JS'), - JSBenchmarker('JS-f32', ['-s', 'PRECISE_F32=2']) + JSBenchmarker('JS-f32', SPIDERMONKEY_ENGINE, ['-s', 'PRECISE_F32=2']), + JSBenchmarker('JS', SPIDERMONKEY_ENGINE), + JSBenchmarker('v8', V8_ENGINE) ] class benchmark(RunnerCore): |