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

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: Calculate elapsed time for the signal strategy progress event as well. 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..70d1617511e1913aa07822f0d3685538cd2edc36 100644
--- a/remoting/webapp/crd/js/log_to_server.js
+++ b/remoting/webapp/crd/js/log_to_server.js
@@ -66,6 +66,8 @@ remoting.LogToServer.prototype.logClientSessionStateChange =
this.sessionStartTime_ = new Date().getTime();
}
}
+ var elapsedTimeInMs = new Date().getTime() - this.sessionStartTime_;
+
// Log the session state change.
var entry = remoting.ServerLogEntry.makeClientSessionStateChange(
state, connectionError, this.mode_);
@@ -82,6 +84,9 @@ remoting.LogToServer.prototype.logClientSessionStateChange =
this.sessionStartTime_ = 0;
}
}
+
+ // Log the time taken to get to this state from the time this session started.
+ entry.addElapsedTimeMs(elapsedTimeInMs);
Jamie 2015/02/27 02:24:46 This is still only being added for session state c
anandc 2015/02/27 21:49:29 Done. LogToServer is reset at the start of each s
this.log_(entry);
// Don't accumulate connection statistics across state changes.
this.logAccumulatedStatistics_();
@@ -104,13 +109,12 @@ remoting.LogToServer.prototype.setConnectionType = function(connectionType) {
/**
* @param {remoting.SignalStrategy.Type} strategyType
* @param {remoting.FallbackSignalStrategy.Progress} progress
- * @param {number} elapsedTimeInMs
*/
remoting.LogToServer.prototype.logSignalStrategyProgress =
- function(strategyType, progress, elapsedTimeInMs) {
+ function(strategyType, progress) {
this.maybeExpireSessionId_();
var entry = remoting.ServerLogEntry.makeSignalStrategyProgress(
- this.sessionId_, strategyType, progress, elapsedTimeInMs);
+ this.sessionId_, strategyType, progress);
this.log_(entry);
};

Powered by Google App Engine
This is Rietveld 408576698