Update the octane suite with the newest release
This commit is contained in:
Родитель
56de60a4b8
Коммит
41b07a60c4
|
@ -45,7 +45,7 @@ class Benchmark:
|
|||
|
||||
class Octane(Benchmark):
|
||||
def __init__(self):
|
||||
Benchmark.__init__(self, "octane", "2.0", "desktop-driver/octane.html")
|
||||
Benchmark.__init__(self, "octane", "2.0.1", "desktop-driver/octane.html")
|
||||
|
||||
def processResults(self, results):
|
||||
ret = []
|
||||
|
|
|
@ -46,10 +46,12 @@ performance.now = (function() {
|
|||
// arguments are functions that will be invoked before and after
|
||||
// running the benchmark, but the running time of these functions will
|
||||
// not be accounted for in the benchmark score.
|
||||
function Benchmark(name, doWarmup, doDeterministic, run, setup, tearDown, rmsResult, minIterations) {
|
||||
function Benchmark(name, doWarmup, doDeterministic, deterministicIterations,
|
||||
run, setup, tearDown, rmsResult, minIterations) {
|
||||
this.name = name;
|
||||
this.doWarmup = doWarmup;
|
||||
this.doDeterministic = doDeterministic;
|
||||
this.deterministicIterations = deterministicIterations;
|
||||
this.run = run;
|
||||
this.Setup = setup ? setup : function() { };
|
||||
this.TearDown = tearDown ? tearDown : function() { };
|
||||
|
@ -96,6 +98,16 @@ BenchmarkSuite.suites = [];
|
|||
// a new benchmark or change an existing one.
|
||||
BenchmarkSuite.version = '9';
|
||||
|
||||
|
||||
// Defines global benchsuite running mode that overrides benchmark suite
|
||||
// behavior. Intended to be set by the benchmark driver. Undefined
|
||||
// values here allow a benchmark to define behaviour itself.
|
||||
BenchmarkSuite.config = {
|
||||
doWarmup: undefined,
|
||||
doDeterministic: undefined
|
||||
};
|
||||
|
||||
|
||||
// Override the alert function to throw an exception instead.
|
||||
alert = function(s) {
|
||||
throw "Alert called with argument: " + s;
|
||||
|
@ -125,7 +137,8 @@ BenchmarkSuite.ResetRNG = function() {
|
|||
// each individual benchmark to avoid running for too long in the
|
||||
// context of browsers. Once done, the final score is reported to the
|
||||
// runner.
|
||||
BenchmarkSuite.RunSuites = function(runner) {
|
||||
BenchmarkSuite.RunSuites = function(runner, skipBenchmarks) {
|
||||
skipBenchmarks = typeof skipBenchmarks === 'undefined' ? [] : skipBenchmarks;
|
||||
var continuation = null;
|
||||
var suites = BenchmarkSuite.suites;
|
||||
var length = suites.length;
|
||||
|
@ -138,7 +151,11 @@ BenchmarkSuite.RunSuites = function(runner) {
|
|||
} else {
|
||||
var suite = suites[index++];
|
||||
if (runner.NotifyStart) runner.NotifyStart(suite.name);
|
||||
continuation = suite.RunStep(runner);
|
||||
if (skipBenchmarks.indexOf(suite.name) > -1) {
|
||||
suite.NotifySkipped(runner);
|
||||
} else {
|
||||
continuation = suite.RunStep(runner);
|
||||
}
|
||||
}
|
||||
if (continuation && typeof window != 'undefined' && window.setTimeout) {
|
||||
window.setTimeout(RunStep, 25);
|
||||
|
@ -249,6 +266,14 @@ BenchmarkSuite.prototype.NotifyResult = function() {
|
|||
}
|
||||
|
||||
|
||||
BenchmarkSuite.prototype.NotifySkipped = function(runner) {
|
||||
BenchmarkSuite.scores.push(1); // push default reference score.
|
||||
if (runner.NotifyResult) {
|
||||
runner.NotifyResult(this.name, "Skipped");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Notifies the runner that running a benchmark resulted in an error.
|
||||
BenchmarkSuite.prototype.NotifyError = function(error) {
|
||||
if (this.runner.NotifyError) {
|
||||
|
@ -263,14 +288,22 @@ BenchmarkSuite.prototype.NotifyError = function(error) {
|
|||
// Runs a single benchmark for at least a second and computes the
|
||||
// average time it takes to run a single iteration.
|
||||
BenchmarkSuite.prototype.RunSingleBenchmark = function(benchmark, data) {
|
||||
var config = BenchmarkSuite.config;
|
||||
var doWarmup = config.doWarmup !== undefined
|
||||
? config.doWarmup
|
||||
: benchmark.doWarmup;
|
||||
var doDeterministic = config.doDeterministic !== undefined
|
||||
? config.doDeterministic
|
||||
: benchmark.doDeterministic;
|
||||
|
||||
function Measure(data) {
|
||||
var elapsed = 0;
|
||||
var start = new Date();
|
||||
|
||||
// Run either for 1 second or for the number of iterations specified
|
||||
// by minIterations, depending on the config flag doDeterministic.
|
||||
for (var i = 0; (benchmark.doDeterministic ?
|
||||
i<benchmark.minIterations : elapsed < 1000); i++) {
|
||||
for (var i = 0; (doDeterministic ?
|
||||
i<benchmark.deterministicIterations : elapsed < 1000); i++) {
|
||||
benchmark.run();
|
||||
elapsed = new Date() - start;
|
||||
}
|
||||
|
@ -281,7 +314,7 @@ BenchmarkSuite.prototype.RunSingleBenchmark = function(benchmark, data) {
|
|||
}
|
||||
|
||||
// Sets up data in order to skip or not the warmup phase.
|
||||
if (!benchmark.doWarmup && data == null) {
|
||||
if (!doWarmup && data == null) {
|
||||
data = { runs: 0, elapsed: 0 };
|
||||
}
|
||||
|
||||
|
|
|
@ -539,8 +539,9 @@ var world = null;
|
|||
|
||||
var Box2DBenchmark = new BenchmarkSuite('Box2D', [5432788],
|
||||
[new Benchmark('Box2D',
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
60,
|
||||
runBox2D,
|
||||
setupBox2D,
|
||||
tearDownBox2D,
|
||||
|
|
|
@ -69,6 +69,7 @@ var CodeLoad = new BenchmarkSuite('CodeLoad', [450000], [
|
|||
new Benchmark('CodeLoadClosure',
|
||||
false,
|
||||
false,
|
||||
1600,
|
||||
runCodeLoadClosure,
|
||||
setupCodeLoad,
|
||||
tearDownCodeLoad,
|
||||
|
@ -77,6 +78,7 @@ var CodeLoad = new BenchmarkSuite('CodeLoad', [450000], [
|
|||
new Benchmark('CodeLoadJQuery',
|
||||
false,
|
||||
false,
|
||||
100,
|
||||
runCodeLoadJQuery,
|
||||
setupCodeLoad,
|
||||
tearDownCodeLoad,
|
||||
|
|
|
@ -32,8 +32,8 @@
|
|||
|
||||
// The code has been adapted for use as a benchmark by Google.
|
||||
var Crypto = new BenchmarkSuite('Crypto', [266181], [
|
||||
new Benchmark("Encrypt", true, false, encrypt),
|
||||
new Benchmark("Decrypt", true, false, decrypt)
|
||||
new Benchmark("Encrypt", true, false, 3900, encrypt),
|
||||
new Benchmark("Decrypt", true, false, 220, decrypt)
|
||||
]);
|
||||
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
|
||||
var DeltaBlue = new BenchmarkSuite('DeltaBlue', [66118], [
|
||||
new Benchmark('DeltaBlue', true, false, deltaBlue)
|
||||
new Benchmark('DeltaBlue', true, false, 4400, deltaBlue)
|
||||
]);
|
||||
|
||||
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
// benchmark harness code at the beginning and end of the file.
|
||||
|
||||
var EarleyBoyer = new BenchmarkSuite('EarleyBoyer', [666463], [
|
||||
new Benchmark("Earley", true, false, function () { BgL_earleyzd2benchmarkzd2(); }),
|
||||
new Benchmark("Boyer", true, false, function () { BgL_nboyerzd2benchmarkzd2(); })
|
||||
new Benchmark("Earley", true, false, 2500, function () { BgL_earleyzd2benchmarkzd2(); }),
|
||||
new Benchmark("Boyer", true, false, 200, function () { BgL_nboyerzd2benchmarkzd2(); })
|
||||
]);
|
||||
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@ var GameboyBenchmark = new BenchmarkSuite('Gameboy', [26288412],
|
|||
[new Benchmark('Gameboy',
|
||||
false,
|
||||
false,
|
||||
20,
|
||||
runGameboy,
|
||||
setupGameboy,
|
||||
tearDownGameboy,
|
||||
|
|
|
@ -30,6 +30,7 @@ var MandreelBenchmark = new BenchmarkSuite('Mandreel', [16831872, 49852],
|
|||
[new Benchmark('Mandreel',
|
||||
false,
|
||||
false,
|
||||
15,
|
||||
runMandreel,
|
||||
setupMandreel,
|
||||
tearDownMandreel,
|
||||
|
|
|
@ -30,6 +30,7 @@ var NavierStokes = new BenchmarkSuite('NavierStokes', [1484000],
|
|||
[new Benchmark('NavierStokes',
|
||||
true,
|
||||
false,
|
||||
180,
|
||||
runNavierStokes,
|
||||
setupNavierStokes,
|
||||
tearDownNavierStokes,
|
||||
|
|
|
@ -27,7 +27,7 @@ var pdf_file = "test.pdf";
|
|||
var canvas_logs = [];
|
||||
|
||||
var PdfJS = new BenchmarkSuite("PdfJS", [10124921], [
|
||||
new Benchmark("PdfJS", false, false,
|
||||
new Benchmark("PdfJS", false, false, 24,
|
||||
runPdfJS, setupPdfJS, tearDownPdfJS, null, 4)
|
||||
]);
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
// JavaScript framework which is used by the ray tracer.
|
||||
|
||||
var RayTrace = new BenchmarkSuite('RayTrace', [739989], [
|
||||
new Benchmark('RayTrace', true, false, renderScene)
|
||||
new Benchmark('RayTrace', true, false, 600, renderScene)
|
||||
]);
|
||||
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
|
||||
|
||||
var RegExpSuite = new BenchmarkSuite('RegExp', [910985], [
|
||||
new Benchmark("RegExp", true, false,
|
||||
new Benchmark("RegExp", true, false, 50,
|
||||
RegExpRun, RegExpSetup, RegExpTearDown, null, 16)
|
||||
]);
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
|
||||
|
||||
var Richards = new BenchmarkSuite('Richards', [35302], [
|
||||
new Benchmark("Richards", true, false, runRichards)
|
||||
new Benchmark("Richards", true, false, 8200, runRichards)
|
||||
]);
|
||||
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2008 the V8 project authors. All rights reserved.
|
||||
// Copyright 2014 the V8 project authors. All rights reserved.
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
|
@ -69,6 +69,9 @@ function PrintScore(score) {
|
|||
}
|
||||
|
||||
|
||||
BenchmarkSuite.config.doWarmup = undefined;
|
||||
BenchmarkSuite.config.doDeterministic = undefined;
|
||||
|
||||
BenchmarkSuite.RunSuites({ NotifyResult: PrintResult,
|
||||
NotifyError: PrintError,
|
||||
NotifyScore: PrintScore });
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
// graph.
|
||||
|
||||
var Splay = new BenchmarkSuite('Splay', [81491, 2739514], [
|
||||
new Benchmark("Splay", true, false,
|
||||
new Benchmark("Splay", true, false, 1400,
|
||||
SplayRun, SplaySetup, SplayTearDown, SplayRMS)
|
||||
]);
|
||||
|
||||
|
|
|
@ -29,6 +29,7 @@ var typescript = new BenchmarkSuite('Typescript', [255011322], [
|
|||
new Benchmark("Typescript",
|
||||
false,
|
||||
true,
|
||||
5,
|
||||
runTypescript,
|
||||
setupTypescript,
|
||||
tearDownTypescript,
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
new BenchmarkSuite('zlib', [152815148], [
|
||||
new Benchmark('zlib', false, true,
|
||||
new Benchmark('zlib', false, true, 10,
|
||||
runZlib, undefined, tearDownZlib, null, 3)]);
|
||||
|
||||
// Fix for jsc
|
||||
|
|
|
@ -41,7 +41,7 @@ class Benchmark:
|
|||
|
||||
class Octane(Benchmark):
|
||||
def __init__(self):
|
||||
Benchmark.__init__(self, "octane", "2.0", "desktop-driver/octane.html")
|
||||
Benchmark.__init__(self, "octane", "2.0.1", "desktop-driver/octane.html")
|
||||
|
||||
def processResults(self, results):
|
||||
ret = []
|
||||
|
|
|
@ -36,7 +36,7 @@ class Benchmark(object):
|
|||
|
||||
class Octane(Benchmark):
|
||||
def __init__(self):
|
||||
super(Octane, self).__init__('octane', '2.0', 'octane')
|
||||
super(Octane, self).__init__('octane', '2.0.1', 'octane')
|
||||
|
||||
def benchmark(self, shell, env, args):
|
||||
full_args = [shell]
|
||||
|
|
|
@ -99,7 +99,7 @@ class AsmJSApps(AsmJS):
|
|||
|
||||
class Octane(Benchmark):
|
||||
def __init__(self):
|
||||
super(Octane, self).__init__('octane', '2.0', 'octane')
|
||||
super(Octane, self).__init__('octane', '2.0.1', 'octane')
|
||||
|
||||
def benchmark(self, shell, env, args):
|
||||
full_args = [shell]
|
||||
|
|
Загрузка…
Ссылка в новой задаче