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

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: LTHI forwards estimates to rendering stats. Created 6 years, 5 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 6c45f71ed8649947e284e1de0e60225582b96f3e..4363ba83dc1ae16b1a78943a9d82ed12112c9410 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::DidActivateSyncTree() {
+base::TimeDelta ProxyTimingHistory::DidActivateSyncTree() {
+ 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