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

Unified Diff: remoting/webapp/crd/js/log_to_server.js

Issue 953223002: Include time elapsed since start of a remoting session in each log entry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rename constant to include time unit, and remove superfluous constant. Created 5 years, 10 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
Index: remoting/webapp/crd/js/log_to_server.js
diff --git a/remoting/webapp/crd/js/log_to_server.js b/remoting/webapp/crd/js/log_to_server.js
index 8b87f1b5c4efc7273b3cb4ce5f43f36ae5926294..7ed56c1c4c0299c83600c7389b26d1faab461176 100644
--- a/remoting/webapp/crd/js/log_to_server.js
+++ b/remoting/webapp/crd/js/log_to_server.js
@@ -93,6 +93,19 @@ remoting.LogToServer.prototype.logClientSessionStateChange =
};
/**
+ Logs the time taken from session start to connection completed.
+ */
+remoting.LogToServer.prototype.logTotalTimeForInitialConnection =
+ function(connectionType) {
+ // Log the total connection time.
+ var entry = remoting.ServerLogEntry.makeTotalTimeForInitialConnection(
+ this.sessionId_, this.mode_,
+ (new Date().getTime() - this.sessionStartTime_) / 1000.0);
Jamie 2015/02/25 21:12:35 I would log in ms, not s (that's what I used for t
anandc 2015/02/26 20:21:49 Done.
+ this.log_(entry);
+};
+
+
+/**
* Set the connection type (direct, stun relay).
*
* @param {string} connectionType

Powered by Google App Engine
This is Rietveld 408576698