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

Unified Diff: tools/perf/metrics/media.js

Issue 23456012: [Telemetry] Improve logging on media measurement tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix buffering_time sec to ms bug Created 7 years, 3 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 | « no previous file | tools/perf/metrics/media.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/metrics/media.js
diff --git a/tools/perf/metrics/media.js b/tools/perf/metrics/media.js
index 57231af4d2faa0ba43fe1633b8fb19029b9d7742..f2d466f615d282e8897ea46d95d5d2f15b23cd1c 100644
--- a/tools/perf/metrics/media.js
+++ b/tools/perf/metrics/media.js
@@ -63,10 +63,10 @@
HTMLMediaMetric.prototype.constructor = HTMLMediaMetric;
HTMLMediaMetric.prototype.setID = function() {
- if (this.element.src)
- this.id = this.element.src.substring(this.element.src.lastIndexOf("/")+1);
- else if (this.element.id)
+ if (this.element.id)
this.id = this.element.id;
+ else if (this.element.src)
+ this.id = this.element.src.substring(this.element.src.lastIndexOf("/")+1);
else
this.id = 'media_' + window.__globalCounter++;
};
@@ -119,7 +119,7 @@
// TODO(shadi): Measure buffering time more accurately using events such as
// stalled, waiting, progress, etc. This works only when continuous playback
// is used.
- this.metrics['buffering_time'] = time_to_end - this.element.duration;
+ this.metrics['buffering_time'] = time_to_end - this.element.duration * 1000;
};
HTMLMediaMetric.prototype.getMetrics = function() {
« no previous file with comments | « no previous file | tools/perf/metrics/media.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698