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

Unified Diff: chrome/browser/sessions/session_restore.cc

Issue 1004033006: Add "SessionRestore.ForegroundTabFirstPaint2" histogram. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sessions/session_restore.cc
diff --git a/chrome/browser/sessions/session_restore.cc b/chrome/browser/sessions/session_restore.cc
index 83b71f4e94be868960976a944364dbdb4f5f8c26..add9491ff90e02451f610ea674e7b754cba8395a 100644
--- a/chrome/browser/sessions/session_restore.cc
+++ b/chrome/browser/sessions/session_restore.cc
@@ -415,6 +415,8 @@ void TabLoader::Observe(int type,
got_first_paint_ = true;
base::TimeDelta time_to_paint =
base::TimeTicks::Now() - restore_started_;
+ // TODO(danduong): to remove this with 467680, to make sure we
+ // don't forget to clean this up.
UMA_HISTOGRAM_CUSTOM_TIMES("SessionRestore.ForegroundTabFirstPaint",
time_to_paint,
base::TimeDelta::FromMilliseconds(10),
@@ -432,6 +434,23 @@ void TabLoader::Observe(int type,
100,
base::Histogram::kUmaTargetedHistogramFlag);
counter_for_count->AddTime(time_to_paint);
+ UMA_HISTOGRAM_CUSTOM_TIMES("SessionRestore.ForegroundTabFirstPaint2",
+ time_to_paint,
+ base::TimeDelta::FromMilliseconds(100),
+ base::TimeDelta::FromMinutes(16),
+ 50);
+ // Record a time for the number of tabs, to help track down
+ // contention.
+ std::string time_for_count2 = base::StringPrintf(
+ "SessionRestore.ForegroundTabFirstPaint2_%d", tab_count_);
+ base::HistogramBase* counter_for_count2 =
+ base::Histogram::FactoryTimeGet(
+ time_for_count2,
+ base::TimeDelta::FromMilliseconds(100),
+ base::TimeDelta::FromMinutes(16),
+ 50,
+ base::Histogram::kUmaTargetedHistogramFlag);
+ counter_for_count2->AddTime(time_to_paint);
} else if (render_widget_hosts_loading_.find(render_widget_host) ==
render_widget_hosts_loading_.end()) {
// If this is a host for a tab we're not loading some other tab
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698