Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(537)

Unified Diff: net/nqe/network_quality_estimator_unittest.cc

Issue 2657093002: Add NetworkQualityEstimator (NQE) UMA when ECT is computed (Closed)
Patch Set: rkaplow comments Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/nqe/network_quality_estimator.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/nqe/network_quality_estimator_unittest.cc
diff --git a/net/nqe/network_quality_estimator_unittest.cc b/net/nqe/network_quality_estimator_unittest.cc
index 88863583f95bb84c30e726b54de653158d18666a..39ef500e1455837d782813917f26eec6f197490f 100644
--- a/net/nqe/network_quality_estimator_unittest.cc
+++ b/net/nqe/network_quality_estimator_unittest.cc
@@ -228,6 +228,10 @@ TEST(NetworkQualityEstimatorTest, TestKbpsRTTUpdates) {
"NQE.EstimateAvailable.MainFrame.TransportRTT", 0, 1);
histogram_tester.ExpectUniqueSample("NQE.EstimateAvailable.MainFrame.Kbps", 0,
1);
+ EXPECT_LE(1u,
+ histogram_tester.GetAllSamples("NQE.RTT.OnECTComputation").size());
+ EXPECT_LE(1u,
+ histogram_tester.GetAllSamples("NQE.Kbps.OnECTComputation").size());
std::unique_ptr<URLRequest> request2(context.CreateRequest(
estimator.GetEchoURL(), DEFAULT_PRIORITY, &test_delegate));
@@ -1818,6 +1822,10 @@ TEST(NetworkQualityEstimatorTest,
"NQE.EstimateAvailable.MainFrame.TransportRTT", 0, 1);
histogram_tester.ExpectUniqueSample("NQE.EstimateAvailable.MainFrame.Kbps", 0,
1);
+ EXPECT_LE(1u,
+ histogram_tester
+ .GetAllSamples("NQE.EffectiveConnectionType.OnECTComputation")
+ .size());
size_t expected_effective_connection_type_notifications = 1;
EXPECT_EQ(expected_effective_connection_type_notifications,
@@ -2041,6 +2049,15 @@ TEST(NetworkQualityEstimatorTest, MAYBE_TestTCPSocketRTT) {
histogram_tester.ExpectBucketCount(
"NQE.MainFrame.EffectiveConnectionType.Unknown",
EFFECTIVE_CONNECTION_TYPE_UNKNOWN, 1);
+ EXPECT_LE(1u,
+ histogram_tester
+ .GetAllSamples("NQE.EffectiveConnectionType.OnECTComputation")
+ .size());
+ EXPECT_LE(1u,
+ histogram_tester.GetAllSamples("NQE.TransportRTT.OnECTComputation")
+ .size());
+ EXPECT_LE(1u,
+ histogram_tester.GetAllSamples("NQE.RTT.OnECTComputation").size());
}
#if defined(OS_IOS)
« no previous file with comments | « net/nqe/network_quality_estimator.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698