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

Unified Diff: base/task_scheduler/scheduler_worker_pool_impl_unittest.cc

Issue 2420973002: Plumb Task Scheduler Histograms to the Task Scheduler Internals Page (Closed)
Patch Set: Created 4 years, 2 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
Index: base/task_scheduler/scheduler_worker_pool_impl_unittest.cc
diff --git a/base/task_scheduler/scheduler_worker_pool_impl_unittest.cc b/base/task_scheduler/scheduler_worker_pool_impl_unittest.cc
index 0f8475a69051fc7f56a1d5d3f3feb1d4a6a75f39..78e9be222281d3f8d605b032923e1f940c9c55a3 100644
--- a/base/task_scheduler/scheduler_worker_pool_impl_unittest.cc
+++ b/base/task_scheduler/scheduler_worker_pool_impl_unittest.cc
@@ -633,13 +633,13 @@ TEST_F(TaskSchedulerWorkerPoolHistogramTest, NumTasksBetweenWaits) {
worker_pool_->WaitForAllWorkersIdleForTesting();
// Verify that counts were recorded to the histogram as expected.
- EXPECT_EQ(0, worker_pool_->num_tasks_between_waits_histogram_for_testing()
+ EXPECT_EQ(0, worker_pool_->num_tasks_between_waits_histogram()
->SnapshotSamples()
->GetCount(0));
- EXPECT_EQ(1, worker_pool_->num_tasks_between_waits_histogram_for_testing()
+ EXPECT_EQ(1, worker_pool_->num_tasks_between_waits_histogram()
->SnapshotSamples()
->GetCount(3));
- EXPECT_EQ(0, worker_pool_->num_tasks_between_waits_histogram_for_testing()
+ EXPECT_EQ(0, worker_pool_->num_tasks_between_waits_histogram()
->SnapshotSamples()
->GetCount(10));
}
@@ -703,7 +703,7 @@ TEST_F(TaskSchedulerWorkerPoolHistogramTest, NumTasksBetweenWaitsWithDetach) {
// expires. Instead, it waits on its WaitableEvent again without running a
// task. The count may be higher than 1 because of spurious wake ups before
// the sleep timeout expires.
- EXPECT_GE(worker_pool_->num_tasks_between_waits_histogram_for_testing()
+ EXPECT_GE(worker_pool_->num_tasks_between_waits_histogram()
->SnapshotSamples()
->GetCount(0),
1);
@@ -711,10 +711,10 @@ TEST_F(TaskSchedulerWorkerPoolHistogramTest, NumTasksBetweenWaitsWithDetach) {
// SchedulerWorker ran a task before waiting on its WaitableEvent at the
// beginning of the test.
EXPECT_EQ(static_cast<int>(kNumWorkersInWorkerPool),
- worker_pool_->num_tasks_between_waits_histogram_for_testing()
+ worker_pool_->num_tasks_between_waits_histogram()
->SnapshotSamples()
->GetCount(1));
- EXPECT_EQ(0, worker_pool_->num_tasks_between_waits_histogram_for_testing()
+ EXPECT_EQ(0, worker_pool_->num_tasks_between_waits_histogram()
->SnapshotSamples()
->GetCount(10));

Powered by Google App Engine
This is Rietveld 408576698