Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Unified Diff: tools/testing/dart/browser_controller.dart

Issue 16848011: Write browser timings on the debug log (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/dart/browser_controller.dart
===================================================================
--- tools/testing/dart/browser_controller.dart (revision 23980)
+++ tools/testing/dart/browser_controller.dart (working copy)
@@ -874,6 +874,7 @@
var embedded_iframe = document.getElementById('embedded_iframe');
var use_iframe = ${useIframe};
+ var start = new Date();
function newTaskHandler() {
if (this.readyState == this.DONE) {
@@ -883,6 +884,8 @@
} else if (this.responseText == '$terminateSignal') {
// Don't do anything, we will be killed shortly.
} else {
+ var elapsed = new Date() - start;
+ reportError('Done getting task at: ' + elapsed);
// TODO(ricow): Do something more clever here.
if (nextTask != undefined) alert('This is really bad');
// The task is send to us as:
@@ -900,6 +903,8 @@
}
function getNextTask() {
+ var elapsed = new Date() - start;
+ reportError('Getting task at: ' + elapsed);
var client = new XMLHttpRequest();
client.onreadystatechange = newTaskHandler;
client.open('GET', '$nextTestPath/$browserId');
@@ -953,6 +958,8 @@
if (this.readyState == this.DONE) {
if (this.status == 200) {
if (last_reported_id != current_id && did_start) {
+ var elapsed = new Date() - start;
+ reportError('Done sending results at: ' + elapsed);
getNextTask();
last_reported_id = current_id;
}
@@ -971,6 +978,8 @@
client.setRequestHeader('Content-type',
'application/x-www-form-urlencoded');
client.send(msg);
+ var elapsed = new Date() - start;
+ reportError('Sending results at: ' + elapsed);
}
function messageHandler(e) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698