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

Unified Diff: remoting/webapp/crd/js/server_log_entry.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: 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
« no previous file with comments | « remoting/webapp/crd/js/log_to_server.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/crd/js/server_log_entry.js
diff --git a/remoting/webapp/crd/js/server_log_entry.js b/remoting/webapp/crd/js/server_log_entry.js
index 7d848aa5b5a4a089f8909778f7108508fd933a75..da37dd8b2c93c051f6ebcd4b6fa198216f49babd 100644
--- a/remoting/webapp/crd/js/server_log_entry.js
+++ b/remoting/webapp/crd/js/server_log_entry.js
@@ -49,6 +49,14 @@ remoting.ServerLogEntry.KEY_SIGNAL_STRATEGY_PROGRESS_ =
/** @private */
remoting.ServerLogEntry.KEY_SIGNAL_STRATEGY_ELAPSED_TIME_ =
'signal-strategy-elapsed-time';
+/** @private */
+remoting.ServerLogEntry.VALUE_EVENT_NAME_TOTAL_TIME_FOR_INITIAL_CONNECT_ =
Sriram 2015/02/25 19:50:44 This is little confusing as why there is value of
anandc 2015/02/25 20:27:55 Done.
+ 'total-time-for-initial-connect';
+/** @private */
+remoting.ServerLogEntry.KEY_TOTAL_TIME_FOR_INITIAL_CONNECT_ =
Sriram 2015/02/25 19:50:44 Include the unit for time in the name.
anandc 2015/02/25 20:27:55 Done.
+ 'total-time-for-initial-connect';
+
+
/**
* @private
@@ -315,6 +323,31 @@ remoting.ServerLogEntry.prototype.addStatsField_ = function(
return (val != 0);
};
+
+/**
+ * Makes a log entry for a "total connection time" event.
+ *
+ * @param {string} sessionId
+ * @param {remoting.DesktopConnectedView.Mode} mode
+ * @param {number} connectionTimeInMs
+ * @return {remoting.ServerLogEntry}
+ */
+remoting.ServerLogEntry.makeTotalTimeForInitialConnection =
+ function(sessionId, mode, connectionTimeInMs) {
+ var entry = new remoting.ServerLogEntry();
+ entry.set_(remoting.ServerLogEntry.KEY_ROLE_,
+ remoting.ServerLogEntry.VALUE_ROLE_CLIENT_);
+ entry.set_(
+ remoting.ServerLogEntry.KEY_EVENT_NAME_,
+ remoting.ServerLogEntry.VALUE_EVENT_NAME_TOTAL_TIME_FOR_INITIAL_CONNECT_);
+ entry.set_(remoting.ServerLogEntry.KEY_TOTAL_TIME_FOR_INITIAL_CONNECT_,
+ String(connectionTimeInMs));
+ entry.addSessionIdField(sessionId);
+ entry.addModeField(mode);
+ return entry;
+};
+
+
/**
* Makes a log entry for a "this session ID is old" event.
*
« no previous file with comments | « remoting/webapp/crd/js/log_to_server.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698