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

Unified Diff: remoting/webapp/base/js/client_session.js

Issue 2913073002: Stops accumulating performance statistics on the Chrome App. (Closed)
Patch Set: Created 3 years, 7 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/base/js/client_plugin_impl.js ('k') | remoting/webapp/base/js/session_logger.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/base/js/client_session.js
diff --git a/remoting/webapp/base/js/client_session.js b/remoting/webapp/base/js/client_session.js
index 8d02310114fac7717554463c8c645dec3dc76e0c..9bafa76cf07af58026f0dcd9fac19c47decf17b5 100644
--- a/remoting/webapp/base/js/client_session.js
+++ b/remoting/webapp/base/js/client_session.js
@@ -228,6 +228,20 @@ remoting.ClientSession.PerfStats.prototype.roundtripLatency = 0;
/** @type {number} */
remoting.ClientSession.PerfStats.prototype.maxRoundtripLatency = 0;
+/**
+ * @param {!remoting.ClientSession.PerfStats} stats
+ * @return {boolean} true if there is any non-zero value in stats, false
+ * otherwise.
+ */
+remoting.ClientSession.PerfStats.hasValidField = function(stats) {
+ for (var key in stats) {
+ if (stats[key] !== 0) {
+ return true;
+ }
+ }
+ return false;
+}
+
// Keys for connection statistics.
remoting.ClientSession.STATS_KEY_VIDEO_BANDWIDTH = 'videoBandwidth';
remoting.ClientSession.STATS_KEY_VIDEO_FRAME_RATE = 'videoFrameRate';
@@ -561,7 +575,7 @@ remoting.ClientSession.prototype.setState_ = function(newState) {
if (newState == remoting.ClientSession.State.CONNECTED) {
this.connectedDisposables_.add(
- new base.RepeatingTimer(this.reportStatistics.bind(this), 1000));
+ new base.RepeatingTimer(this.reportStatistics.bind(this), 1000 * 60));
if (this.plugin_.hasCapability(
remoting.ClientSession.Capability.TOUCH_EVENTS)) {
this.plugin_.enableTouchEvents(true);
« no previous file with comments | « remoting/webapp/base/js/client_plugin_impl.js ('k') | remoting/webapp/base/js/session_logger.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698