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

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

Issue 23998002: cc: Fixed computation of dropped frames. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « cc/debug/frame_rate_counter.cc ('k') | tools/perf/metrics/smoothness.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/metrics/smoothness.js
diff --git a/tools/perf/metrics/smoothness.js b/tools/perf/metrics/smoothness.js
index e563dcb51a48528e508cc381d6dd92c4b76cc331..1fdf975b681a38d3a06f60b7f84c51d779b32925 100644
--- a/tools/perf/metrics/smoothness.js
+++ b/tools/perf/metrics/smoothness.js
@@ -149,10 +149,11 @@
RafRenderingStats.prototype.getDroppedFrameCount_ = function(frameTimes) {
var droppedFrameCount = 0;
+ var droppedFrameThreshold = 1000 / 55;
for (var i = 1; i < frameTimes.length; i++) {
var frameTime = frameTimes[i] - frameTimes[i-1];
- if (frameTime > 1000 / 55)
- droppedFrameCount++;
+ if (frameTime > droppedFrameThreshold)
+ droppedFrameCount += Math.floor(frameTime / droppedFrameThreshold);
}
return droppedFrameCount;
};
« no previous file with comments | « cc/debug/frame_rate_counter.cc ('k') | tools/perf/metrics/smoothness.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698