Commit 8bf6c2f6 authored by rajendrant's avatar rajendrant Committed by Commit Bot

Obsolete the DataUse.MessageSize.<ServiceName> histograms

DataUse.MessageSize.<ServiceName> histogram is recorded for each service.
This histogram is used sparingly. Since there are more services, this
per service histogram is not needed.

Bug: 732638
Change-Id: I0d6a54ec4037da6692d8a5dcb7a537641aa111c1
Reviewed-on: https://chromium-review.googlesource.com/742690
Commit-Queue: rajendrant <rajendrant@chromium.org>
Reviewed-by: default avatarSteven Holte <holte@chromium.org>
Reviewed-by: default avatarTarun Bansal <tbansal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#539912}
parent 95dc1352
......@@ -394,9 +394,6 @@ void DataUseMeasurement::ReportDataUsageServices(
DataUseUserData::AppState app_state,
bool is_connection_cellular,
int64_t message_size) const {
RecordUMAHistogramCount(
"DataUse.MessageSize." + DataUseUserData::GetServiceNameAsString(service),
message_size);
if (message_size > 0) {
IncreaseSparseHistogramByValue(
GetHistogramName("DataUse.MessageSize.AllServices", dir, app_state,
......
......@@ -123,9 +123,8 @@ class DataUseMeasurement {
void ReportServicesMessageSizeUMA(const net::URLRequest& request);
// Records data use histograms of services. It gets the size of exchanged
// message, its direction (which is upstream or downstream) and reports to two
// histogram groups. DataUse.MessageSize.ServiceName and
// DataUse.Services.{Dimensions}. In the second one, services are buckets.
// message, its direction (which is upstream or downstream) and reports to the
// histogram DataUse.Services.{Dimensions} with, services as the buckets.
// |app_state| indicates the app state which can be foreground, background, or
// unknown.
void ReportDataUsageServices(
......
......@@ -195,8 +195,6 @@ class DataUseMeasurementTest : public testing::Test {
histogram_tester.ExpectTotalCount("DataUse.TrafficSize.System.Upstream." +
target_dimension + kConnectionType,
1);
// One upload and one download message, so total count should be 2.
histogram_tester.ExpectTotalCount("DataUse.MessageSize.Suggestions", 2);
}
DataUseMeasurement* data_use_measurement() { return &data_use_measurement_; }
......
......@@ -150,9 +150,8 @@ class DataUseNetworkDelegateTest : public testing::Test {
// This function tests data use measurement for requests by services. it makes a
// query which is similar to a query of a service, so it should affect
// DataUse.TrafficSize.System.Dimensions and DataUse.MessageSize.ServiceName
// histograms. AppState and ConnectionType dimensions are always Foreground and
// NotCellular respectively.
// DataUse.TrafficSize.System.Dimensions histogram. AppState and ConnectionType
// dimensions are always Foreground and NotCellular respectively.
TEST_F(DataUseNetworkDelegateTest, DataUseMeasurementServiceTest) {
base::HistogramTester histogram_tester;
......@@ -165,9 +164,6 @@ TEST_F(DataUseNetworkDelegateTest, DataUseMeasurementServiceTest) {
.empty());
histogram_tester.ExpectTotalCount(
"DataUse.TrafficSize.System.Upstream.Foreground.NotCellular", 1);
EXPECT_FALSE(histogram_tester
.GetTotalCountsForPrefix("DataUse.MessageSize.Suggestions")
.empty());
histogram_tester.ExpectTotalCount(
"DataUse.TrafficSize.User.Downstream.Foreground.NotCellular", 0);
histogram_tester.ExpectTotalCount(
......@@ -194,14 +190,13 @@ TEST_F(DataUseNetworkDelegateTest, DataUseMeasurementUserTest) {
"DataUse.TrafficSize.System.Downstream.Foreground.NotCellular", 0);
histogram_tester.ExpectTotalCount(
"DataUse.TrafficSize.System.Upstream.Foreground.NotCellular", 0);
histogram_tester.ExpectTotalCount("DataUse.MessageSize.Suggestions", 0);
}
// This function tests data use measurement for requests by services in case the
// request is redirected once. it makes a query which is similar to a query of a
// service, so it should affect DataUse.TrafficSize.System.Dimensions and
// DataUse.MessageSize.ServiceName histograms. AppState and ConnectionType
// dimensions are always Foreground and NotCellular respectively.
// histogram. AppState and ConnectionType dimensions are always Foreground and
// NotCellular respectively.
TEST_F(DataUseNetworkDelegateTest, DataUseMeasurementServiceTestWithRedirect) {
base::HistogramTester histogram_tester;
......@@ -215,9 +210,6 @@ TEST_F(DataUseNetworkDelegateTest, DataUseMeasurementServiceTestWithRedirect) {
histogram_tester.ExpectTotalCount(
"DataUse.TrafficSize.System.Upstream.Foreground.NotCellular", 2);
// Two uploads and two downloads message, so totalCount should be 4.
EXPECT_FALSE(histogram_tester
.GetTotalCountsForPrefix("DataUse.MessageSize.Suggestions")
.empty());
histogram_tester.ExpectTotalCount(
"DataUse.TrafficSize.User.Downstream.Foreground.NotCellular", 0);
histogram_tester.ExpectTotalCount(
......@@ -245,7 +237,6 @@ TEST_F(DataUseNetworkDelegateTest, DataUseMeasurementUserTestWithRedirect) {
"DataUse.TrafficSize.System.Downstream.Foreground.NotCellular", 0);
histogram_tester.ExpectTotalCount(
"DataUse.TrafficSize.System.Upstream.Foreground.NotCellular", 0);
histogram_tester.ExpectTotalCount("DataUse.MessageSize.Suggestions", 0);
}
} // namespace
......
......@@ -14497,6 +14497,9 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries.
</histogram>
<histogram name="DataUse.MessageSize" units="bytes">
<obsolete>
Deprecated 10/2017.
</obsolete>
<owner>amohammadkhan@chromium.org</owner>
<owner>bengr@chromium.org</owner>
<summary>
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