Commit 4115f382 authored by Takashi Toyoshima's avatar Takashi Toyoshima Committed by Commit Bot

ResourceLoadScheduler: obsolete replaced metrics

ResourceLoadScheduler.{Traffic|Decoded}Bytes.{Main|Sub}frame(Not)?Throttled
were introduced to measure loading traffic and data amount per
throttling state and frame types. After the first introduction,
ResourceLoadScheduler.{Traffic|Decoded}Bytes.KBPerFrameStatus were also
introduced as metrics that can replace them, and are easy to be compared.

This patch removes measuring code for the older metrics, and marks
histogram items as obsolete.

Bug: 854016, 854019
Change-Id: I5eb469c9699060c0018437097d9cfc4940c4c19a
Reviewed-on: https://chromium-review.googlesource.com/1157952Reviewed-by: default avatarAlexander Timin <altimin@chromium.org>
Reviewed-by: default avatarSteven Holte <holte@chromium.org>
Commit-Queue: Takashi Toyoshima <toyoshim@chromium.org>
Cr-Commit-Position: refs/heads/master@{#580831}
parent b7c6888a
......@@ -192,53 +192,15 @@ void ResourceLoadScheduler::TrafficMonitor::Report(
("Blink.ResourceLoadScheduler.RequestCount",
ToSample(ReportCircumstance::kNumOfCircumstances)));
DEFINE_STATIC_LOCAL(
CustomCountHistogram, main_frame_throttled_traffic_bytes,
("Blink.ResourceLoadScheduler.TrafficBytes.MainframeThrottled", 0,
kMaximumReportSize1G, kReportBucketCount));
DEFINE_STATIC_LOCAL(
CustomCountHistogram, main_frame_not_throttled_traffic_bytes,
("Blink.ResourceLoadScheduler.TrafficBytes.MainframeNotThrottled", 0,
kMaximumReportSize1G, kReportBucketCount));
DEFINE_STATIC_LOCAL(
CustomCountHistogram, sub_frame_throttled_traffic_bytes,
("Blink.ResourceLoadScheduler.TrafficBytes.SubframeThrottled", 0,
kMaximumReportSize1G, kReportBucketCount));
DEFINE_STATIC_LOCAL(
CustomCountHistogram, sub_frame_not_throttled_traffic_bytes,
("Blink.ResourceLoadScheduler.TrafficBytes.SubframeNotThrottled", 0,
kMaximumReportSize1G, kReportBucketCount));
DEFINE_STATIC_LOCAL(
CustomCountHistogram, main_frame_throttled_decoded_bytes,
("Blink.ResourceLoadScheduler.DecodedBytes.MainframeThrottled", 0,
kMaximumReportSize1G, kReportBucketCount));
DEFINE_STATIC_LOCAL(
CustomCountHistogram, main_frame_not_throttled_decoded_bytes,
("Blink.ResourceLoadScheduler.DecodedBytes.MainframeNotThrottled", 0,
kMaximumReportSize1G, kReportBucketCount));
DEFINE_STATIC_LOCAL(
CustomCountHistogram, sub_frame_throttled_decoded_bytes,
("Blink.ResourceLoadScheduler.DecodedBytes.SubframeThrottled", 0,
kMaximumReportSize1G, kReportBucketCount));
DEFINE_STATIC_LOCAL(
CustomCountHistogram, sub_frame_not_throttled_decoded_bytes,
("Blink.ResourceLoadScheduler.DecodedBytes.SubframeNotThrottled", 0,
kMaximumReportSize1G, kReportBucketCount));
switch (current_state_) {
case scheduler::SchedulingLifecycleState::kThrottled:
case scheduler::SchedulingLifecycleState::kHidden:
if (is_main_frame_) {
request_count_by_circumstance.Count(
ToSample(ReportCircumstance::kMainframeThrottled));
main_frame_throttled_traffic_bytes.Count(hints.encoded_data_length());
main_frame_throttled_decoded_bytes.Count(hints.decoded_body_length());
} else {
request_count_by_circumstance.Count(
ToSample(ReportCircumstance::kSubframeThrottled));
sub_frame_throttled_traffic_bytes.Count(hints.encoded_data_length());
sub_frame_throttled_decoded_bytes.Count(hints.decoded_body_length());
}
total_throttled_request_count_++;
total_throttled_traffic_bytes_ += hints.encoded_data_length();
......@@ -248,17 +210,9 @@ void ResourceLoadScheduler::TrafficMonitor::Report(
if (is_main_frame_) {
request_count_by_circumstance.Count(
ToSample(ReportCircumstance::kMainframeNotThrottled));
main_frame_not_throttled_traffic_bytes.Count(
hints.encoded_data_length());
main_frame_not_throttled_decoded_bytes.Count(
hints.decoded_body_length());
} else {
request_count_by_circumstance.Count(
ToSample(ReportCircumstance::kSubframeNotThrottled));
sub_frame_not_throttled_traffic_bytes.Count(
hints.encoded_data_length());
sub_frame_not_throttled_decoded_bytes.Count(
hints.decoded_body_length());
}
total_not_throttled_request_count_++;
total_not_throttled_traffic_bytes_ += hints.encoded_data_length();
......
......@@ -8778,6 +8778,9 @@ uploading your change for review.
<histogram base="true" name="Blink.ResourceLoadScheduler.DecodedBytes"
units="bytes">
<obsolete>
Deprecated as of 8/2018.
</obsolete>
<!-- Name completed by histogram_suffixes name="ResourceLoadScheduler.FrameType" -->
<owner>toyoshim@chromium.org</owner>
......@@ -8862,6 +8865,9 @@ uploading your change for review.
<histogram base="true" name="Blink.ResourceLoadScheduler.TrafficBytes"
units="bytes">
<obsolete>
Deprecated as of 8/2018.
</obsolete>
<!-- Name completed by histogram_suffixes name="ResourceLoadScheduler.FrameType" -->
<owner>toyoshim@chromium.org</owner>
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