Commit 5c5efd31 authored by Stephen Chenney's avatar Stephen Chenney Committed by Commit Bot

Fix various Rendering Core UMA metrics

The Blink.ForcedStyleAndLayout.UpdateTime metric has too many samples
and sometimes overflows the sample counter in a 30 minute period. So
randomly choose to sample with 1/100 probability.

The Blink.Compositing.LayerPromotionCount.IndirectComposited UMA has
a bigger range than the histogram, so increase the max value and the
number of buckets.

Bug: 950600,950540
Change-Id: I8bd9bf30ed73c4ef61742ab4664c6eb4e5c8ae18
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1613748
Auto-Submit: Stephen Chenney <schenney@chromium.org>
Reviewed-by: default avatarvmpstr <vmpstr@chromium.org>
Commit-Queue: Stephen Chenney <schenney@chromium.org>
Cr-Commit-Position: refs/heads/master@{#660922}
parent 8923c6bc
...@@ -139,8 +139,14 @@ void LocalFrameUkmAggregator::RecordSample(size_t metric_index, ...@@ -139,8 +139,14 @@ void LocalFrameUkmAggregator::RecordSample(size_t metric_index,
auto& record = absolute_metric_records_[metric_index]; auto& record = absolute_metric_records_[metric_index];
record.interval_duration += duration; record.interval_duration += duration;
// Record the UMA // Record the UMA
if (record.uma_counter) // ForcedStyleAndLayout happen so frequently on some pages that we overflow
// the signed 32 counter for number of events in a 30 minute period. So
// randomly record with probability 1/100.
if (record.uma_counter &&
(metric_index != static_cast<MetricId>(kForcedStyleAndLayout) ||
base::RandInt(0, 99) == 0)) {
record.uma_counter->CountMicroseconds(duration); record.uma_counter->CountMicroseconds(duration);
}
// Only record ratios when inside a main frame. // Only record ratios when inside a main frame.
if (in_main_frame_update_) { if (in_main_frame_update_) {
......
...@@ -183,7 +183,7 @@ void PaintLayerCompositor::UpdateIfNeededRecursive( ...@@ -183,7 +183,7 @@ void PaintLayerCompositor::UpdateIfNeededRecursive(
compositing_reasons_stats.assumed_overlap_layers, 1, 1000, 5); compositing_reasons_stats.assumed_overlap_layers, 1, 1000, 5);
UMA_HISTOGRAM_CUSTOM_COUNTS( UMA_HISTOGRAM_CUSTOM_COUNTS(
"Blink.Compositing.LayerPromotionCount.IndirectComposited", "Blink.Compositing.LayerPromotionCount.IndirectComposited",
compositing_reasons_stats.indirect_composited_layers, 1, 1000, 5); compositing_reasons_stats.indirect_composited_layers, 1, 10000, 10);
UMA_HISTOGRAM_CUSTOM_COUNTS( UMA_HISTOGRAM_CUSTOM_COUNTS(
"Blink.Compositing.LayerPromotionCount.TotalComposited", "Blink.Compositing.LayerPromotionCount.TotalComposited",
compositing_reasons_stats.total_composited_layers, 1, 1000, 10); compositing_reasons_stats.total_composited_layers, 1, 1000, 10);
......
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