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. |
* |