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

Side by Side Diff: remoting/webapp/base/js/client_session.js

Issue 2004673002: Initialize remoting.ClientSession.PerfStats with zeros (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reviewer's Feedback Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | remoting/webapp/base/js/connection_stats.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview 6 * @fileoverview
7 * Class handling creation and teardown of a remoting client session. 7 * Class handling creation and teardown of a remoting client session.
8 * 8 *
9 * The ClientSession class controls lifetime of the client plugin 9 * The ClientSession class controls lifetime of the client plugin
10 * object and provides the plugin with the functionality it needs to 10 * object and provides the plugin with the functionality it needs to
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 } 196 }
197 return remoting.ClientSession.ConnectionError[error]; 197 return remoting.ClientSession.ConnectionError[error];
198 } 198 }
199 199
200 /** 200 /**
201 * Type used for performance statistics collected by the plugin. 201 * Type used for performance statistics collected by the plugin.
202 * @constructor 202 * @constructor
203 */ 203 */
204 remoting.ClientSession.PerfStats = function() {}; 204 remoting.ClientSession.PerfStats = function() {};
205 /** @type {number} */ 205 /** @type {number} */
206 remoting.ClientSession.PerfStats.prototype.videoBandwidth; 206 remoting.ClientSession.PerfStats.prototype.videoBandwidth = 0;
207 /** @type {number} */ 207 /** @type {number} */
208 remoting.ClientSession.PerfStats.prototype.videoFrameRate; 208 remoting.ClientSession.PerfStats.prototype.videoFrameRate = 0;
209 /** @type {number} */ 209 /** @type {number} */
210 remoting.ClientSession.PerfStats.prototype.captureLatency; 210 remoting.ClientSession.PerfStats.prototype.captureLatency = 0;
211 /** @type {number} */ 211 /** @type {number} */
212 remoting.ClientSession.PerfStats.prototype.maxCaptureLatency; 212 remoting.ClientSession.PerfStats.prototype.maxCaptureLatency = 0;
213 /** @type {number} */ 213 /** @type {number} */
214 remoting.ClientSession.PerfStats.prototype.encodeLatency; 214 remoting.ClientSession.PerfStats.prototype.encodeLatency = 0;
215 /** @type {number} */ 215 /** @type {number} */
216 remoting.ClientSession.PerfStats.prototype.maxEncodeLatency; 216 remoting.ClientSession.PerfStats.prototype.maxEncodeLatency = 0;
217 /** @type {number} */ 217 /** @type {number} */
218 remoting.ClientSession.PerfStats.prototype.decodeLatency; 218 remoting.ClientSession.PerfStats.prototype.decodeLatency = 0;
219 /** @type {number} */ 219 /** @type {number} */
220 remoting.ClientSession.PerfStats.prototype.maxDecodeLatency; 220 remoting.ClientSession.PerfStats.prototype.maxDecodeLatency = 0;
221 /** @type {number} */ 221 /** @type {number} */
222 remoting.ClientSession.PerfStats.prototype.renderLatency; 222 remoting.ClientSession.PerfStats.prototype.renderLatency = 0;
223 /** @type {number} */ 223 /** @type {number} */
224 remoting.ClientSession.PerfStats.prototype.maxRenderLatency; 224 remoting.ClientSession.PerfStats.prototype.maxRenderLatency = 0;
225 /** @type {number} */ 225 /** @type {number} */
226 remoting.ClientSession.PerfStats.prototype.roundtripLatency; 226 remoting.ClientSession.PerfStats.prototype.roundtripLatency = 0;
227 /** @type {number} */ 227 /** @type {number} */
228 remoting.ClientSession.PerfStats.prototype.maxRoundtripLatency; 228 remoting.ClientSession.PerfStats.prototype.maxRoundtripLatency = 0;
229 229
230 // Keys for connection statistics. 230 // Keys for connection statistics.
231 remoting.ClientSession.STATS_KEY_VIDEO_BANDWIDTH = 'videoBandwidth'; 231 remoting.ClientSession.STATS_KEY_VIDEO_BANDWIDTH = 'videoBandwidth';
232 remoting.ClientSession.STATS_KEY_VIDEO_FRAME_RATE = 'videoFrameRate'; 232 remoting.ClientSession.STATS_KEY_VIDEO_FRAME_RATE = 'videoFrameRate';
233 remoting.ClientSession.STATS_KEY_CAPTURE_LATENCY = 'captureLatency'; 233 remoting.ClientSession.STATS_KEY_CAPTURE_LATENCY = 'captureLatency';
234 remoting.ClientSession.STATS_KEY_ENCODE_LATENCY = 'encodeLatency'; 234 remoting.ClientSession.STATS_KEY_ENCODE_LATENCY = 'encodeLatency';
235 remoting.ClientSession.STATS_KEY_DECODE_LATENCY = 'decodeLatency'; 235 remoting.ClientSession.STATS_KEY_DECODE_LATENCY = 'decodeLatency';
236 remoting.ClientSession.STATS_KEY_RENDER_LATENCY = 'renderLatency'; 236 remoting.ClientSession.STATS_KEY_RENDER_LATENCY = 'renderLatency';
237 remoting.ClientSession.STATS_KEY_ROUNDTRIP_LATENCY = 'roundtripLatency'; 237 remoting.ClientSession.STATS_KEY_ROUNDTRIP_LATENCY = 'roundtripLatency';
238 238
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
713 } else if (previous == State.CONNECTED && current == State.FAILED) { 713 } else if (previous == State.CONNECTED && current == State.FAILED) {
714 return State.CONNECTION_DROPPED; 714 return State.CONNECTION_DROPPED;
715 } 715 }
716 return current; 716 return current;
717 }; 717 };
718 718
719 /** @private */ 719 /** @private */
720 remoting.ClientSession.prototype.reportStatistics = function() { 720 remoting.ClientSession.prototype.reportStatistics = function() {
721 this.logger_.logStatistics(this.plugin_.getPerfStats()); 721 this.logger_.logStatistics(this.plugin_.getPerfStats());
722 }; 722 };
OLDNEW
« no previous file with comments | « no previous file | remoting/webapp/base/js/connection_stats.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698