MCPcopy Create free account
hub / github.com/chen3feng/toft / TEST_P

Function TEST_P

system/threading/thread_pool_test.cpp:131–139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129class ThreadPoolTest : public testing::TestWithParam<int> {};
130
131TEST_P(ThreadPoolTest, Performance)
132{
133 int num_threads = GetParam();
134 std::cout << "Test with " << num_threads << " threads." << "\n";
135 ThreadPool threadpool(num_threads);
136 for (int i = 0; i < kLoopCount; ++i)
137 threadpool.AddTask(DoNothong);
138 // threadpool.WaitForIdle();
139}
140
141INSTANTIATE_TEST_CASE_P(ThreadPoolTest, ThreadPoolTest, testing::Values(1, 2, 4, 8, 16, 32));
142

Callers

nothing calls this directly

Calls 1

AddTaskMethod · 0.80

Tested by

no test coverage detected