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

Unified Diff: components/page_load_metrics/browser/metrics_web_contents_observer.cc

Issue 2151363003: Split redirect delay metrics into separate histograms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cleanup Created 4 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
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | tools/metrics/histograms/histograms.xml » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/page_load_metrics/browser/metrics_web_contents_observer.cc
diff --git a/components/page_load_metrics/browser/metrics_web_contents_observer.cc b/components/page_load_metrics/browser/metrics_web_contents_observer.cc
index 5039557a870d9105b727da9e2eddc1834b170424..8504057898477aa1a6c94ab64e27559156da03cd 100644
--- a/components/page_load_metrics/browser/metrics_web_contents_observer.cc
+++ b/components/page_load_metrics/browser/metrics_web_contents_observer.cc
@@ -47,8 +47,10 @@ const char kAbortChainSizeSameURL[] =
"PageLoad.Internal.ProvisionalAbortChainSize.SameURL";
const char kAbortChainSizeNoCommit[] =
"PageLoad.Internal.ProvisionalAbortChainSize.NoCommit";
-const char kClientRedirectDelayAfterPaint[] =
- "PageLoad.Internal.ClientRedirectDelayAfterPaint";
+const char kClientRedirectFirstPaintToNavigation[] =
+ "PageLoad.Internal.ClientRedirect.FirstPaintToNavigation";
+const char kClientRedirectWithoutPaint[] =
+ "PageLoad.Internal.ClientRedirect.NavigationWithoutPaint";
} // namespace internal
@@ -386,16 +388,18 @@ void PageLoadTracker::OnInputEvent(const blink::WebInputEvent& event) {
void PageLoadTracker::NotifyClientRedirectTo(
const PageLoadTracker& destination) {
- base::TimeDelta redirect_delay_after_paint;
if (timing_.first_paint) {
base::TimeTicks first_paint_time =
navigation_start() + timing_.first_paint.value();
+ base::TimeDelta first_paint_to_navigation;
if (destination.navigation_start() > first_paint_time)
- redirect_delay_after_paint =
+ first_paint_to_navigation =
destination.navigation_start() - first_paint_time;
+ PAGE_LOAD_HISTOGRAM(internal::kClientRedirectFirstPaintToNavigation,
+ first_paint_to_navigation);
+ } else {
+ UMA_HISTOGRAM_COUNTS(internal::kClientRedirectWithoutPaint, 1);
Ilya Sherman 2016/07/15 23:05:38 This allocates 50 buckets, of which only one is us
Bryan McQuade 2016/07/17 13:18:06 Ah, good to know, thanks! Switched.
}
- PAGE_LOAD_HISTOGRAM(internal::kClientRedirectDelayAfterPaint,
- redirect_delay_after_paint);
}
bool PageLoadTracker::UpdateTiming(const PageLoadTiming& new_timing,
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | tools/metrics/histograms/histograms.xml » ('J')

Powered by Google App Engine
This is Rietveld 408576698