Chromium Code Reviews| 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..f8aed71abd3875935f8be230845adbdce5fe6e3a 100644 |
| --- a/remoting/webapp/crd/js/server_log_entry.js |
| +++ b/remoting/webapp/crd/js/server_log_entry.js |
| @@ -49,6 +49,11 @@ remoting.ServerLogEntry.KEY_SIGNAL_STRATEGY_PROGRESS_ = |
| /** @private */ |
| remoting.ServerLogEntry.KEY_SIGNAL_STRATEGY_ELAPSED_TIME_ = |
| 'signal-strategy-elapsed-time'; |
| +/** @private */ |
| +remoting.ServerLogEntry.EVENT_TOTAL_TIME_FOR_INITIAL_CONNECT_MS_ = |
| + 'total-time-for-initial-connect'; |
|
Jamie
2015/02/25 21:12:35
I don't think we should need a separate log entry
anandc
2015/02/26 20:21:49
Done.
|
| + |
| + |
| /** |
| * @private |
| @@ -315,6 +320,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.EVENT_TOTAL_TIME_FOR_INITIAL_CONNECT_MS_); |
| + entry.set_(remoting.ServerLogEntry.EVENT_TOTAL_TIME_FOR_INITIAL_CONNECT_MS_, |
| + String(connectionTimeInMs)); |
| + entry.addSessionIdField(sessionId); |
| + entry.addModeField(mode); |
| + return entry; |
| +}; |
| + |
| + |
| /** |
| * Makes a log entry for a "this session ID is old" event. |
| * |