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

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: address comments 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') | no next file with comments »
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..5b0d5dde828234aa95d6a4b8834394db1c4934b8 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_BOOLEAN(internal::kClientRedirectWithoutPaint, true);
}
- 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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698