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

Unified Diff: cc/trees/proxy_timing_history.cc

Issue 363003002: Add duration estimation data to RenderingStats. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Check we only add duration data once per frame. Created 6 years, 6 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: cc/trees/proxy_timing_history.cc
diff --git a/cc/trees/proxy_timing_history.cc b/cc/trees/proxy_timing_history.cc
index e920f285697911cd449f96d05973015359d45928..c3f254d7fc4aaa85cd62512fc73011b5dce69dcb 100644
--- a/cc/trees/proxy_timing_history.cc
+++ b/cc/trees/proxy_timing_history.cc
@@ -41,15 +41,21 @@ void ProxyTimingHistory::DidBeginMainFrame() {
begin_main_frame_sent_time_ = base::TimeTicks::HighResNow();
}
-void ProxyTimingHistory::DidCommit() {
+base::TimeDelta ProxyTimingHistory::DidCommit() {
commit_complete_time_ = base::TimeTicks::HighResNow();
+ base::TimeDelta begin_main_frame_to_commit_duration =
+ commit_complete_time_ - begin_main_frame_sent_time_;
begin_main_frame_to_commit_duration_history_.InsertSample(
- commit_complete_time_ - begin_main_frame_sent_time_);
+ begin_main_frame_to_commit_duration);
+ return begin_main_frame_to_commit_duration;
}
-void ProxyTimingHistory::DidActivatePendingTree() {
+base::TimeDelta ProxyTimingHistory::DidActivatePendingTree() {
+ base::TimeDelta commit_to_activate_duration =
+ base::TimeTicks::HighResNow() - commit_complete_time_;
commit_to_activate_duration_history_.InsertSample(
- base::TimeTicks::HighResNow() - commit_complete_time_);
+ commit_to_activate_duration);
+ return commit_to_activate_duration;
}
void ProxyTimingHistory::DidStartDrawing() {

Powered by Google App Engine
This is Rietveld 408576698