Commit 5a79a749 authored by Nicolás Peña Moreno's avatar Nicolás Peña Moreno Committed by Commit Bot

Do not report 0 LargestImagePaint and LargestTextPaint to UMA/UKM

This CL is a revert of the functional parts of commit ef514667. We
have decided that these should not be reported as they skew the values
in the histograms in undesirable ways. These 0 values correspond to
times during which the largest image is not yet fully loaded.

Bug: 1017335
Change-Id: I6bbae41f0e0357198f752291c50a439003cd9bc7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1875285Reviewed-by: default avatarBryan McQuade <bmcquade@chromium.org>
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#710544}
parent 11c7b9bc
......@@ -33,8 +33,6 @@ class ContentfulPaintTimingInfo {
}
bool IsEmpty() const {
// |size_| is not necessarily 0, for example, when the largest image is
// still loading.
return !time_;
}
......
......@@ -382,20 +382,24 @@ mojom::PageLoadTimingPtr MetricsRenderFrameObserver::GetTiming() const {
timing->paint_timing->first_meaningful_paint =
ClampDelta(perf.FirstMeaningfulPaint(), start);
}
if (perf.LargestImagePaintSize() > 0) {
if (perf.LargestImagePaint() > 0.0) {
timing->paint_timing->largest_image_paint =
perf.LargestImagePaint() == 0.0
? base::TimeDelta()
: ClampDelta(perf.LargestImagePaint(), start);
ClampDelta(perf.LargestImagePaint(), start);
timing->paint_timing->largest_image_paint_size =
perf.LargestImagePaintSize();
// LargestImagePaintSize should be available if LargestImagePaint is
// available. Note that size can be nonzero while the time is 0 since a time
// of 0 is sent when the image is painting. We are intentionally ignoring
// these cases, as they should not be reported by the UMA/UKM histograms.
DCHECK(perf.LargestImagePaintSize());
}
if (perf.LargestTextPaintSize() > 0) {
if (perf.LargestTextPaint() > 0.0) {
timing->paint_timing->largest_text_paint =
perf.LargestTextPaint() == 0.0
? base::TimeDelta()
: ClampDelta(perf.LargestTextPaint(), start);
ClampDelta(perf.LargestTextPaint(), start);
timing->paint_timing->largest_text_paint_size = perf.LargestTextPaintSize();
// LargestTextPaint and LargestTextPaintSize should be available at the
// same time. This is a renderer side DCHECK to ensure this.
DCHECK(perf.LargestTextPaintSize());
}
if (perf.ParseStart() > 0.0)
timing->parse_timing->parse_start = ClampDelta(perf.ParseStart(), start);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment