Skip to content

Commit

Permalink
Ad metrics: Remove PageLoad.Clients.Ads...PercentNetwork2 histograms.
Browse files Browse the repository at this point in the history
This makes the histogram obsolete and removes the lines that record
and test it.

Bug: 1135300
Change-Id: I12c61700e32d44875a0fa96ec41bf62eff9aeb2b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2472523
Reviewed-by: John Delaney <johnidel@chromium.org>
Reviewed-by: Brian White <bcwhite@chromium.org>
Commit-Queue: Cammie Smith Barnes <cammie@chromium.org>
Cr-Commit-Position: refs/heads/master@{#817713}
  • Loading branch information
pythagoraskitty authored and Commit Bot committed Oct 15, 2020
1 parent 631e273 commit a7e61fe
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1023,13 +1023,6 @@ void AdsPageLoadMetricsObserver::RecordAggregateHistogramsForAdTagging(
ADS_HISTOGRAM("Bytes.AdFrames.Aggregate.Network", PAGE_BYTES_HISTOGRAM,
visibility, aggregate_ad_info.network_bytes);

if (aggregate_ad_info.bytes) {
ADS_HISTOGRAM(
"Bytes.AdFrames.Aggregate.PercentNetwork2", UMA_HISTOGRAM_PERCENTAGE,
visibility,
aggregate_ad_info.network_bytes * 100 / aggregate_ad_info.bytes);
}

if (memory_request_) {
ADS_HISTOGRAM("Memory.Aggregate.Max", PAGE_BYTES_HISTOGRAM, visibility,
aggregate_ad_info.v8_max_memory_bytes);
Expand Down Expand Up @@ -1153,12 +1146,6 @@ void AdsPageLoadMetricsObserver::RecordPerFrameHistogramsForAdTagging(
visibility, ad_frame_data.bytes());
ADS_HISTOGRAM("Bytes.AdFrames.PerFrame.Network", PAGE_BYTES_HISTOGRAM,
visibility, ad_frame_data.network_bytes());
if (ad_frame_data.bytes() > 0) {
ADS_HISTOGRAM(
"Bytes.AdFrames.PerFrame.PercentNetwork2", UMA_HISTOGRAM_PERCENTAGE,
visibility,
ad_frame_data.network_bytes() * 100 / ad_frame_data.bytes());
}
if (memory_request_) {
ADS_HISTOGRAM("Memory.PerFrame.Max", PAGE_BYTES_HISTOGRAM, visibility,
ad_frame_data.v8_max_memory_bytes_used());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,12 +312,6 @@ void TestHistograms(const base::HistogramTester& histograms,
SuffixedHistogram("Bytes.AdFrames.PerFrame.Network"),
network_bytes_and_count.first, network_bytes_and_count.second);
}
for (const auto& percent_network_and_count :
frames_with_percent_network_count) {
histograms.ExpectBucketCount(
SuffixedHistogram("Bytes.AdFrames.PerFrame.PercentNetwork2"),
percent_network_and_count.first, percent_network_and_count.second);
}

histograms.ExpectUniqueSample(
SuffixedHistogram("Bytes.AdFrames.Aggregate.Total2"), total_ad_kb, 1);
Expand All @@ -339,11 +333,6 @@ void TestHistograms(const base::HistogramTester& histograms,
(total_ad_kb + non_ad_cached_kb + non_ad_uncached_kb),
1);
}
if (total_ad_kb > 0) {
histograms.ExpectUniqueSample(
SuffixedHistogram("Bytes.AdFrames.Aggregate.PercentNetwork2"),
((total_ad_uncached_kb * 100) / total_ad_kb), 1);
}
if (total_ad_uncached_kb + non_ad_uncached_kb > 0) {
histograms.ExpectUniqueSample(
SuffixedHistogram("Bytes.FullPage.Network.PercentAdFrames"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,11 @@ reviews. Googlers can read more about this at go/gwsq-gerrit.
</obsolete>
</suffix>
<suffix name="PercentNetwork2"
label="The percentage of bytes that were loaded over the network."/>
label="The percentage of bytes that were loaded over the network.">
<obsolete>
Removed 10/2020.
</obsolete>
</suffix>
<affected-histogram name="PageLoad.Clients.Ads.Bytes.AdFrames.Aggregate"/>
<affected-histogram name="PageLoad.Clients.Ads.Bytes.AdFrames.PerFrame"/>
<affected-histogram
Expand Down

0 comments on commit a7e61fe

Please sign in to comment.