summaryrefslogtreecommitdiff
path: root/deps/v8/test/js-perf-test/base.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/test/js-perf-test/base.js')
-rw-r--r--deps/v8/test/js-perf-test/base.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/deps/v8/test/js-perf-test/base.js b/deps/v8/test/js-perf-test/base.js
index cef2867f2b..61089f039f 100644
--- a/deps/v8/test/js-perf-test/base.js
+++ b/deps/v8/test/js-perf-test/base.js
@@ -54,7 +54,6 @@ BenchmarkResult.prototype.valueOf = function() {
return this.time;
}
-
// Suites of benchmarks consist of a name and the set of benchmarks in
// addition to the reference timing that the final score will be based
// on. This way, all scores are relative to a reference run and higher
@@ -66,6 +65,15 @@ function BenchmarkSuite(name, reference, benchmarks) {
BenchmarkSuite.suites.push(this);
}
+function createSuite(name, reference, run, setup, tearDown) {
+ return new BenchmarkSuite(name, [reference], [
+ new Benchmark(name, false, false, 0, run, setup, tearDown)]);
+}
+
+function createSuiteWithWarmup(name, reference, run, setup, tearDown) {
+ return new BenchmarkSuite(name, [reference], [
+ new Benchmark(name, true, false, 0, run, setup, tearDown)]);
+}
// Keep track of all declared benchmark suites.
BenchmarkSuite.suites = [];