[Test] Update all SixSpeed tests to run in separate processes.
BUG=v8:5922 Review-Url: https://codereview.chromium.org/2674873002 Cr-Commit-Position: refs/heads/master@{#42954}
This commit is contained in:
parent
aea3ce3df3
commit
b69b24a2a2
@ -10,30 +10,36 @@
|
||||
"tests": [
|
||||
{
|
||||
"name": "Array pattern destructuring",
|
||||
"path": ["SixSpeed/array_destructuring"],
|
||||
"main": "run.js",
|
||||
"resources": [
|
||||
"run.js",
|
||||
"array_destructuring.js"
|
||||
],
|
||||
"path": ["SixSpeed"],
|
||||
"results_regexp": "^%s\\(Score\\): (.+)$",
|
||||
"tests": [
|
||||
{"name": "ArrayDestructuring-ES5"},
|
||||
{"name": "ArrayDestructuring-ES6"}
|
||||
{
|
||||
"name": "ES5",
|
||||
"main": "run.js",
|
||||
"test_flags": ["array_destructuring/es5"]
|
||||
},
|
||||
{
|
||||
"name": "ES6",
|
||||
"main": "run.js",
|
||||
"test_flags": ["array_destructuring/es6"]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Computed property names in object literals",
|
||||
"path": ["SixSpeed/object_literals"],
|
||||
"main": "run.js",
|
||||
"resources": [
|
||||
"run.js",
|
||||
"object_literals.js"
|
||||
],
|
||||
"path": ["SixSpeed"],
|
||||
"results_regexp": "^%s\\(Score\\): (.+)$",
|
||||
"tests": [
|
||||
{"name": "ObjectLiterals-ES5"},
|
||||
{"name": "ObjectLiterals-ES6"}
|
||||
{
|
||||
"name": "ES5",
|
||||
"main": "run.js",
|
||||
"test_flags": ["object_literals/es5"]
|
||||
},
|
||||
{
|
||||
"name": "ES6",
|
||||
"main": "run.js",
|
||||
"test_flags": ["object_literals/es6"]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -52,39 +58,46 @@
|
||||
},
|
||||
{
|
||||
"name": "Spread",
|
||||
"path": ["SixSpeed/spread"],
|
||||
"main": "run.js",
|
||||
"resources": [
|
||||
"run.js",
|
||||
"spread.js"
|
||||
],
|
||||
"path": ["SixSpeed"],
|
||||
"results_regexp": "^%s\\(Score\\): (.+)$",
|
||||
"tests": [
|
||||
{"name": "Spread-ES5"},
|
||||
{"name": "Spread-Traceur"},
|
||||
{"name": "Spread-ES6"}
|
||||
{
|
||||
"name": "ES5",
|
||||
"main": "run.js",
|
||||
"test_flags": ["spread/es5"]
|
||||
},
|
||||
{
|
||||
"name": "Babel",
|
||||
"main": "run.js",
|
||||
"test_flags": ["spread/babel"]
|
||||
},
|
||||
{
|
||||
"name": "ES6",
|
||||
"main": "run.js",
|
||||
"test_flags": ["spread/es6"]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "SuperSpread",
|
||||
"path": ["SixSpeed/super_spread"],
|
||||
"path": ["SixSpeed"],
|
||||
"flags": ["--future"],
|
||||
"results_regexp": "^%s\\(Score\\): (.+)$",
|
||||
"tests": [
|
||||
{
|
||||
"name": "ES5",
|
||||
"main": "run.js",
|
||||
"test_flags": ["es5"]
|
||||
"test_flags": ["super_spread/es5"]
|
||||
},
|
||||
{
|
||||
"name": "Babel",
|
||||
"main": "run.js",
|
||||
"test_flags": ["babel"]
|
||||
"test_flags": ["super_spread/babel"]
|
||||
},
|
||||
{
|
||||
"name": "ES6",
|
||||
"main": "run.js",
|
||||
"test_flags": ["es6"]
|
||||
"test_flags": ["super_spread/es6"]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -1,38 +0,0 @@
|
||||
// Copyright 2016 the V8 project authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// This benchmark is based on the six-speed benchmark build output.
|
||||
// Copyright 2014 Kevin Decker <https://github.com/kpdecker/six-speed/>
|
||||
|
||||
|
||||
new BenchmarkSuite('ArrayDestructuring-ES5', [1000], [
|
||||
new Benchmark('ES5', false, false, 0, ES5),
|
||||
]);
|
||||
|
||||
new BenchmarkSuite('ArrayDestructuring-ES6', [1000], [
|
||||
new Benchmark('ES6', false, false, 0, ES6),
|
||||
]);
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Benchmark: ES5
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
function ES5() {
|
||||
"use strict";
|
||||
var data = [1, 2, 3];
|
||||
var c = data[0];
|
||||
return c;
|
||||
}
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Benchmark: ES6
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
function ES6() {
|
||||
"use strict";
|
||||
var data = [1, 2, 3];
|
||||
var [c] = data;
|
||||
return c;
|
||||
}
|
17
test/js-perf-test/SixSpeed/array_destructuring/es5.js
Normal file
17
test/js-perf-test/SixSpeed/array_destructuring/es5.js
Normal file
@ -0,0 +1,17 @@
|
||||
// Copyright 2017 the V8 project authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// This benchmark is based on the six-speed benchmark build output.
|
||||
// Copyright 2014 Kevin Decker <https://github.com/kpdecker/six-speed/>
|
||||
|
||||
new BenchmarkSuite('ES5', [1000], [
|
||||
new Benchmark('ES5', false, false, 0, ES5),
|
||||
]);
|
||||
|
||||
function ES5() {
|
||||
"use strict";
|
||||
var data = [1, 2, 3];
|
||||
var c = data[0];
|
||||
return c;
|
||||
}
|
17
test/js-perf-test/SixSpeed/array_destructuring/es6.js
Normal file
17
test/js-perf-test/SixSpeed/array_destructuring/es6.js
Normal file
@ -0,0 +1,17 @@
|
||||
// Copyright 2017 the V8 project authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// This benchmark is based on the six-speed benchmark build output.
|
||||
// Copyright 2014 Kevin Decker <https://github.com/kpdecker/six-speed/>
|
||||
|
||||
new BenchmarkSuite('ES6', [1000], [
|
||||
new Benchmark('ES6', false, false, 0, ES6),
|
||||
]);
|
||||
|
||||
function ES6() {
|
||||
"use strict";
|
||||
var data = [1, 2, 3];
|
||||
var [c] = data;
|
||||
return c;
|
||||
}
|
@ -1,25 +0,0 @@
|
||||
// Copyright 2016 the V8 project authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
load('../../base.js');
|
||||
load('array_destructuring.js');
|
||||
|
||||
var success = true;
|
||||
|
||||
function PrintResult(name, result) {
|
||||
print(name + '(Score): ' + result);
|
||||
}
|
||||
|
||||
|
||||
function PrintError(name, error) {
|
||||
PrintResult(name, error);
|
||||
success = false;
|
||||
}
|
||||
|
||||
|
||||
BenchmarkSuite.config.doWarmup = undefined;
|
||||
BenchmarkSuite.config.doDeterministic = undefined;
|
||||
|
||||
BenchmarkSuite.RunSuites({ NotifyResult: PrintResult,
|
||||
NotifyError: PrintError });
|
18
test/js-perf-test/SixSpeed/object_literals/es5.js
Normal file
18
test/js-perf-test/SixSpeed/object_literals/es5.js
Normal file
@ -0,0 +1,18 @@
|
||||
// Copyright 2017 the V8 project authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// This benchmark is based on the six-speed benchmark build output.
|
||||
// Copyright 2014 Kevin Decker <https://github.com/kpdecker/six-speed/>
|
||||
|
||||
new BenchmarkSuite('ES5', [1000], [
|
||||
new Benchmark('ES5', false, false, 0, ES5),
|
||||
]);
|
||||
|
||||
function ES5() {
|
||||
"use strict";
|
||||
var name = 'foo';
|
||||
var ret = {};
|
||||
ret[name] = 'bar';
|
||||
return ret;
|
||||
}
|
19
test/js-perf-test/SixSpeed/object_literals/es6.js
Normal file
19
test/js-perf-test/SixSpeed/object_literals/es6.js
Normal file
@ -0,0 +1,19 @@
|
||||
// Copyright 2017 the V8 project authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// This benchmark is based on the six-speed benchmark build output.
|
||||
// Copyright 2014 Kevin Decker <https://github.com/kpdecker/six-speed/>
|
||||
|
||||
new BenchmarkSuite('ES6', [1000], [
|
||||
new Benchmark('ES6', false, false, 0, ES6),
|
||||
]);
|
||||
|
||||
function ES6() {
|
||||
"use strict";
|
||||
var name = 'foo';
|
||||
var ret = {
|
||||
[name]: 'bar',
|
||||
};
|
||||
return ret;
|
||||
}
|
@ -1,41 +0,0 @@
|
||||
// Copyright 2016 the V8 project authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// This benchmark is based on the six-speed benchmark build output.
|
||||
// Copyright 2014 Kevin Decker <https://github.com/kpdecker/six-speed/>
|
||||
|
||||
|
||||
new BenchmarkSuite('ObjectLiterals-ES5', [1000], [
|
||||
new Benchmark('ES5', false, false, 0, ES5),
|
||||
]);
|
||||
|
||||
new BenchmarkSuite('ObjectLiterals-ES6', [1000], [
|
||||
new Benchmark('ES6', false, false, 0, ES6),
|
||||
]);
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Benchmark: ES5
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
function ES5() {
|
||||
"use strict";
|
||||
var name = 'foo';
|
||||
var ret = {};
|
||||
ret[name] = 'bar';
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Benchmark: ES6
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
function ES6() {
|
||||
"use strict";
|
||||
var name = 'foo';
|
||||
var ret = {
|
||||
[name]: 'bar',
|
||||
};
|
||||
return ret;
|
||||
}
|
@ -1,25 +0,0 @@
|
||||
// Copyright 2016 the V8 project authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
load('../../base.js');
|
||||
load('object_literals.js');
|
||||
|
||||
var success = true;
|
||||
|
||||
function PrintResult(name, result) {
|
||||
print(name + '(Score): ' + result);
|
||||
}
|
||||
|
||||
|
||||
function PrintError(name, error) {
|
||||
PrintResult(name, error);
|
||||
success = false;
|
||||
}
|
||||
|
||||
|
||||
BenchmarkSuite.config.doWarmup = undefined;
|
||||
BenchmarkSuite.config.doDeterministic = undefined;
|
||||
|
||||
BenchmarkSuite.RunSuites({ NotifyResult: PrintResult,
|
||||
NotifyError: PrintError });
|
@ -2,7 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
load('../../base.js');
|
||||
load('../base.js');
|
||||
load(arguments[0] + '.js');
|
||||
|
||||
var success = true;
|
15
test/js-perf-test/SixSpeed/spread/babel.js
Normal file
15
test/js-perf-test/SixSpeed/spread/babel.js
Normal file
@ -0,0 +1,15 @@
|
||||
// Copyright 2017 the V8 project authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// This benchmark is based on the six-speed benchmark build output.
|
||||
// Copyright 2014 Kevin Decker <https://github.com/kpdecker/six-speed/>
|
||||
|
||||
new BenchmarkSuite('Babel', [1000], [
|
||||
new Benchmark('Babel', false, false, 0, Babel),
|
||||
]);
|
||||
|
||||
function Babel() {
|
||||
"use strict";
|
||||
return Math.max.apply(Math, [1, 2, 3]);
|
||||
}
|
15
test/js-perf-test/SixSpeed/spread/es5.js
Normal file
15
test/js-perf-test/SixSpeed/spread/es5.js
Normal file
@ -0,0 +1,15 @@
|
||||
// Copyright 2017 the V8 project authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// This benchmark is based on the six-speed benchmark build output.
|
||||
// Copyright 2014 Kevin Decker <https://github.com/kpdecker/six-speed/>
|
||||
|
||||
new BenchmarkSuite('ES5', [1000], [
|
||||
new Benchmark('ES5', false, false, 0, ES5),
|
||||
]);
|
||||
|
||||
function ES5() {
|
||||
"use strict";
|
||||
return Math.max.apply(Math, [1, 2, 3]);
|
||||
}
|
15
test/js-perf-test/SixSpeed/spread/es6.js
Normal file
15
test/js-perf-test/SixSpeed/spread/es6.js
Normal file
@ -0,0 +1,15 @@
|
||||
// Copyright 2017 the V8 project authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// This benchmark is based on the six-speed benchmark build output.
|
||||
// Copyright 2014 Kevin Decker <https://github.com/kpdecker/six-speed/>
|
||||
|
||||
new BenchmarkSuite('ES6', [1000], [
|
||||
new Benchmark('ES6', false, false, 0, ES6),
|
||||
]);
|
||||
|
||||
function ES6() {
|
||||
"use strict";
|
||||
return Math.max(...[1, 2, 3]);
|
||||
}
|
@ -1,25 +0,0 @@
|
||||
// Copyright 2016 the V8 project authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
load('../../base.js');
|
||||
load('spread.js');
|
||||
|
||||
var success = true;
|
||||
|
||||
function PrintResult(name, result) {
|
||||
print(name + '(Score): ' + result);
|
||||
}
|
||||
|
||||
|
||||
function PrintError(name, error) {
|
||||
PrintResult(name, error);
|
||||
success = false;
|
||||
}
|
||||
|
||||
|
||||
BenchmarkSuite.config.doWarmup = undefined;
|
||||
BenchmarkSuite.config.doDeterministic = undefined;
|
||||
|
||||
BenchmarkSuite.RunSuites({ NotifyResult: PrintResult,
|
||||
NotifyError: PrintError });
|
@ -1,73 +0,0 @@
|
||||
// Copyright 2016 the V8 project authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// This benchmark is based on the six-speed benchmark build output.
|
||||
// Copyright 2014 Kevin Decker <https://github.com/kpdecker/six-speed/>
|
||||
|
||||
|
||||
new BenchmarkSuite('Spread-ES5', [1000], [
|
||||
new Benchmark('ES5', false, false, 0, ES5),
|
||||
]);
|
||||
|
||||
new BenchmarkSuite('Spread-Traceur', [1000], [
|
||||
new Benchmark('Traceur', false, false, 0, Traceur),
|
||||
]);
|
||||
|
||||
new BenchmarkSuite('Spread-ES6', [1000], [
|
||||
new Benchmark('ES6', false, false, 0, ES6),
|
||||
]);
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Benchmark: ES5
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
function ES5() {
|
||||
"use strict";
|
||||
return Math.max.apply(Math, [1,2,3]);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Benchmark: Traceur
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
function checkObjectCoercible(v) {
|
||||
"use strict";
|
||||
if (v === null || v === undefined) {
|
||||
throw new $TypeError('Value cannot be converted to an Object');
|
||||
}
|
||||
return v;
|
||||
}
|
||||
|
||||
function spread() {
|
||||
"use strict";
|
||||
var rv = [],
|
||||
j = 0,
|
||||
iterResult;
|
||||
for (var i = 0; i < arguments.length; i++) {
|
||||
var valueToSpread = checkObjectCoercible(arguments[i]);
|
||||
if (typeof valueToSpread[Symbol.iterator] !== 'function') {
|
||||
throw new TypeError('Cannot spread non-iterable object.');
|
||||
}
|
||||
var iter = valueToSpread[Symbol.iterator]();
|
||||
while (!(iterResult = iter.next()).done) {
|
||||
rv[j++] = iterResult.value;
|
||||
}
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
function Traceur() {
|
||||
"use strict";
|
||||
var $__0;
|
||||
return ($__0 = Math).max.apply($__0, spread([1, 2, 3]));
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Benchmark: ES6
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
function ES6() {
|
||||
"use strict";
|
||||
return Math.max(...[1,2,3]);
|
||||
}
|
Loading…
Reference in New Issue
Block a user