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

Unified Diff: components/memory_pressure/memory_pressure_stats_collector_unittest.cc

Issue 2317083002: Remove unused metric from memory_pressure component. (Closed)
Patch Set: Fix unittest. Created 4 years, 3 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 | « components/memory_pressure/memory_pressure_stats_collector.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/memory_pressure/memory_pressure_stats_collector_unittest.cc
diff --git a/components/memory_pressure/memory_pressure_stats_collector_unittest.cc b/components/memory_pressure/memory_pressure_stats_collector_unittest.cc
index 9557205df7cc693139c7249a8f12cdaf262aa565..cc7788bac381cf0b6d4cc2a4d6be2af69c56ae39 100644
--- a/components/memory_pressure/memory_pressure_stats_collector_unittest.cc
+++ b/components/memory_pressure/memory_pressure_stats_collector_unittest.cc
@@ -14,7 +14,6 @@ namespace {
// Histogram names.
const char kPressureLevel[] = "Memory.PressureLevel";
-const char kPressureLevelChange[] = "Memory.PressureLevelChange";
} // namespace
@@ -81,7 +80,6 @@ TEST_F(MemoryPressureStatsCollectorTest, EndToEnd) {
// Upon construction no statistics should yet have been reported.
ExpectAccumulated(0, 0, 0);
ExpectReported(0, 0, 0);
- histograms_.ExpectTotalCount(kPressureLevelChange, 0);
// A first call should not invoke any reporting functions, but it should
// modify member variables.
@@ -93,7 +91,6 @@ TEST_F(MemoryPressureStatsCollectorTest, EndToEnd) {
EXPECT_EQ(tick_clock_.NowTicks(), collector_.last_update_time());
ExpectAccumulated(0, 0, 0);
ExpectReported(0, 0, 0);
- histograms_.ExpectTotalCount(kPressureLevelChange, 0);
// A subsequent call with the same pressure level should increment the
// cumulative time but not make a report, as less than one second of time
@@ -106,7 +103,6 @@ TEST_F(MemoryPressureStatsCollectorTest, EndToEnd) {
EXPECT_EQ(tick_clock_.NowTicks(), collector_.last_update_time());
ExpectAccumulated(500, 0, 0);
ExpectReported(0, 0, 0);
- histograms_.ExpectTotalCount(kPressureLevelChange, 0);
// Yet another call and this time a report should be made, as one second
// of time has been accumulated. 500ms should remain unreported.
@@ -118,7 +114,6 @@ TEST_F(MemoryPressureStatsCollectorTest, EndToEnd) {
EXPECT_EQ(tick_clock_.NowTicks(), collector_.last_update_time());
ExpectAccumulated(500, 0, 0);
ExpectReported(1, 0, 0);
- histograms_.ExpectTotalCount(kPressureLevelChange, 0);
// A subsequent call with a different pressure level should increment the
// cumulative time and make several reports.
@@ -130,10 +125,6 @@ TEST_F(MemoryPressureStatsCollectorTest, EndToEnd) {
EXPECT_EQ(tick_clock_.NowTicks(), collector_.last_update_time());
ExpectAccumulated(500, 250, 0);
ExpectReported(1, 2, 0);
- histograms_.ExpectBucketCount(
- kPressureLevelChange, UMA_MEMORY_PRESSURE_LEVEL_CHANGE_NONE_TO_MODERATE,
- 1);
- histograms_.ExpectTotalCount(kPressureLevelChange, 1);
}
} // namespace memory_pressure
« no previous file with comments | « components/memory_pressure/memory_pressure_stats_collector.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698