Commit 420b2dcf authored by rniwa@webkit.org's avatar rniwa@webkit.org

[chromium perf] DOM/DOMWalk.html failures

https://bugs.webkit.org/show_bug.cgi?id=104866

Reviewed by Eric Seidel.

Use PerfTestRunner.now which in turn uses window.performance.now() when it's available.

* DOM/resources/dom-perf.js:
(Interval.start):
(Interval.stop):
(BenchmarkSuite.prototype.RunSingle):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137623 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 70271a9f
2012-12-13 Ryosuke Niwa <rniwa@webkit.org>
[chromium perf] DOM/DOMWalk.html failures
https://bugs.webkit.org/show_bug.cgi?id=104866
Reviewed by Eric Seidel.
Use PerfTestRunner.now which in turn uses window.performance.now() when it's available.
* DOM/resources/dom-perf.js:
(Interval.start):
(Interval.stop):
(BenchmarkSuite.prototype.RunSingle):
2012-12-05 Shinya Kawanaka <shinyak@chromium.org>
[Shadow] Performance tests for ShadowDOM distribution
......
......@@ -84,8 +84,8 @@ byId = function(id, doc) {
function Interval() {
var start_ = 0;
var stop_ = 0;
this.start = function() { start_ = new Date(); };
this.stop = function() { stop_ = new Date(); };
this.start = function() { start_ = PerfTestRunner.now(); };
this.stop = function() { stop_ = PerfTestRunner.now(); };
this.microseconds = function() { return (stop_ - start_) * 1000; };
}
......@@ -139,7 +139,7 @@ function BenchmarkSuite(name, benchmarks) {
// This computes the amount of overhead is associated with the call to the test
// function and getting the date.
BenchmarkSuite.start = new Date();
BenchmarkSuite.start = PerfTestRunner.now();
BenchmarkSuite.Math = new (function() {
// Computes the geometric mean of a set of numbers.
......@@ -215,7 +215,7 @@ function BenchmarkResult(benchmark, times, error, benchmarkContent) {
// single iteration.
BenchmarkSuite.prototype.RunSingle = function(benchmark, times) {
var elapsed = 0;
var start = new Date();
var start = PerfTestRunner.now();
var runInterval = new Interval();
var setupReturn = null;
var runReturn = null;
......@@ -254,7 +254,7 @@ BenchmarkSuite.prototype.RunSingle = function(benchmark, times) {
} catch (e) {
error = e;
}
totalTime = new Date() - start;
totalTime = PerfTestRunner.now() - start;
}
var result = new BenchmarkResult(benchmark, times, error, null);
......
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