Commit 98ca77a0 authored by petermarshall's avatar petermarshall Committed by Commit bot

[Test] Reconfigure SuperSpread benchmarks to run in separate processes.

BUG=v8:5922

Review-Url: https://codereview.chromium.org/2669223002
Cr-Commit-Position: refs/heads/master@{#42929}
parent c21d1281
......@@ -54,17 +54,24 @@
{
"name": "SuperSpread",
"path": ["SixSpeed/super_spread"],
"main": "run.js",
"resources": [
"run.js",
"super_spread.js"
],
"flags": ["--future"],
"results_regexp": "^%s\\(Score\\): (.+)$",
"tests": [
{"name": "SuperSpread-ES5"},
{"name": "SuperSpread-Babel"},
{"name": "SuperSpread-ES6"}
{
"name": "ES5",
"main": "run.js",
"test_flags": ["es5"]
},
{
"name": "Babel",
"main": "run.js",
"test_flags": ["babel"]
},
{
"name": "ES6",
"main": "run.js",
"test_flags": ["es6"]
}
]
}
]
......
......@@ -5,45 +5,10 @@
// This benchmark is based on the six-speed benchmark build output.
// Copyright 2014 Kevin Decker <https://github.com/kpdecker/six-speed/>
new BenchmarkSuite('SuperSpread-ES5', [1000], [
new Benchmark('ES5', false, false, 0, ES5),
]);
new BenchmarkSuite('SuperSpread-Babel', [1000], [
new BenchmarkSuite('Babel', [1000], [
new Benchmark('Babel', false, false, 0, Babel),
]);
new BenchmarkSuite('SuperSpread-ES6', [1000], [
new Benchmark('ES6', false, false, 0, ES6),
]);
// ----------------------------------------------------------------------------
// Benchmark: ES5
// ----------------------------------------------------------------------------
function ES5() {
'use strict';
function Point(x, y) {
this.x = x;
this.y = y;
}
function MyPoint() {
Point.apply(this, arguments);
}
function makePoint(x, y) {
return new MyPoint(x, y);
}
return makePoint(1, 2);
}
// ----------------------------------------------------------------------------
// Benchmark: Babel
// ----------------------------------------------------------------------------
function _possibleConstructorReturn(self, call) {
if (!self) {
throw new ReferenceError(
......@@ -79,55 +44,32 @@ function _classCallCheck(instance, Constructor) {
}
}
function Babel() {
'use strict';
var Point = function Point(x, y) {
_classCallCheck(this, Point);
this.x = x;
this.y = y;
};
var Point = function Point(x, y) {
_classCallCheck(this, Point);
var MyPoint = function(_Point) {
_inherits(MyPoint, _Point);
this.x = x;
this.y = y;
};
function MyPoint() {
_classCallCheck(this, MyPoint);
return _possibleConstructorReturn(
this, (MyPoint.__proto__ || Object.getPrototypeOf(MyPoint))
.apply(this, arguments));
}
var MyPoint = function(_Point) {
_inherits(MyPoint, _Point);
return MyPoint;
}(Point);
function MyPoint() {
_classCallCheck(this, MyPoint);
function makePoint(x, y) {
return new MyPoint(x, y);
return _possibleConstructorReturn(
this, (MyPoint.__proto__ || Object.getPrototypeOf(MyPoint))
.apply(this, arguments));
}
return makePoint(1, 2);
}
return MyPoint;
}(Point);
// ----------------------------------------------------------------------------
// Benchmark: ES6
// ----------------------------------------------------------------------------
function makePoint(x, y) {
return new MyPoint(x, y);
}
function ES6() {
function Babel() {
'use strict';
class Point {
constructor(x, y) {
this.x = x;
this.y = y;
}
}
class MyPoint extends Point {}
function makePoint(x, y) {
return new MyPoint(x, y);
}
return makePoint(1, 2);
}
// 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 Point(x, y) {
this.x = x;
this.y = y;
}
function MyPoint() {
Point.apply(this, arguments);
}
function makePoint(x, y) {
return new MyPoint(x, y);
}
function ES5() {
'use strict';
return makePoint(1, 2);
}
// 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),
]);
class Point {
constructor(x, y) {
this.x = x;
this.y = y;
}
}
class MyPoint extends Point {}
function makePoint(x, y) {
return new MyPoint(x, y);
}
function ES6() {
'use strict';
return makePoint(1, 2);
}
......@@ -3,7 +3,7 @@
// found in the LICENSE file.
load('../../base.js');
load('super_spread.js');
load(arguments[0] + '.js');
var success = true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment