summaryrefslogtreecommitdiffstats
path: root/tools/page_cycler
diff options
context:
space:
mode:
authorjnd@chromium.org <jnd@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-10 08:46:39 +0000
committerjnd@chromium.org <jnd@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-10 08:46:39 +0000
commit8129873f9b39437790f496d6574dc626703a0aec (patch)
tree54d92d663ae33b2485f8a8d0aa5f7ad92257c1ff /tools/page_cycler
parent1dce708bbe7fdef15436e20f36f805f53bfdcb73 (diff)
downloadchromium_src-8129873f9b39437790f496d6574dc626703a0aec.zip
chromium_src-8129873f9b39437790f496d6574dc626703a0aec.tar.gz
chromium_src-8129873f9b39437790f496d6574dc626703a0aec.tar.bz2
Log page cycler results to console.
Logging the results to console will allow us to monitor the console ouput to know the test result without using UI Automation mechanism. Also moving the logic of calculating timing before logging the result to console. Review URL: http://codereview.chromium.org/9375006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@121412 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/page_cycler')
-rw-r--r--tools/page_cycler/database/head.js15
-rw-r--r--tools/page_cycler/indexed_db/head.js15
2 files changed, 16 insertions, 14 deletions
diff --git a/tools/page_cycler/database/head.js b/tools/page_cycler/database/head.js
index 4694a9c..ab0e91c 100644
--- a/tools/page_cycler/database/head.js
+++ b/tools/page_cycler/database/head.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -54,6 +54,12 @@ function nextCycleOrResults() {
window.gc();
}
+ var timings = elapsedTime;
+ var oldTimings = __get_timings();
+ if (oldTimings != '')
+ timings = oldTimings + ',' + timings;
+ __set_timings(timings);
+
var tLag = Date.now() - endTime - TIMEOUT;
if (tLag > 0)
fudgeTime += tLag;
@@ -62,16 +68,11 @@ function nextCycleOrResults() {
if (cycle == iterations) {
document.cookie = '__pc_done=1; path=/';
doc = '../../common/report.html';
+ if (window.console) console.log("times: [" + __get_timings() + "]");
} else {
doc = 'index.html';
}
- var timings = elapsedTime;
- var oldTimings = __get_timings();
- if (oldTimings != '')
- timings = oldTimings + ',' + timings;
- __set_timings(timings);
-
var url = doc + '?n=' + iterations + '&i=' + cycle +
'&td=' + totalTime + '&tf=' + fudgeTime;
document.location.href = url;
diff --git a/tools/page_cycler/indexed_db/head.js b/tools/page_cycler/indexed_db/head.js
index 4694a9c..ab0e91c 100644
--- a/tools/page_cycler/indexed_db/head.js
+++ b/tools/page_cycler/indexed_db/head.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -54,6 +54,12 @@ function nextCycleOrResults() {
window.gc();
}
+ var timings = elapsedTime;
+ var oldTimings = __get_timings();
+ if (oldTimings != '')
+ timings = oldTimings + ',' + timings;
+ __set_timings(timings);
+
var tLag = Date.now() - endTime - TIMEOUT;
if (tLag > 0)
fudgeTime += tLag;
@@ -62,16 +68,11 @@ function nextCycleOrResults() {
if (cycle == iterations) {
document.cookie = '__pc_done=1; path=/';
doc = '../../common/report.html';
+ if (window.console) console.log("times: [" + __get_timings() + "]");
} else {
doc = 'index.html';
}
- var timings = elapsedTime;
- var oldTimings = __get_timings();
- if (oldTimings != '')
- timings = oldTimings + ',' + timings;
- __set_timings(timings);
-
var url = doc + '?n=' + iterations + '&i=' + cycle +
'&td=' + totalTime + '&tf=' + fudgeTime;
document.location.href = url;