/commonlibrary/c_utils/base/test/benchmarktest/safe_block_queue_benchmark_test/ |
H A D | safe_block_queue_benchmark_test.cpp | 197 void QueueFullHandler(std::thread (&threads)[THREAD_NUM], std::array<DemoThreadData, THREAD_NUM>& demoDatas, 200 // 1. queue is full and some threads is blocked 217 // queue is full and some threads is blocked and is not joined 225 for (auto& t : threads) { 235 * @tc.desc: Multiple threads put until blocking runs, one thread gets, all threads finish running normally 240 std::thread threads[THREAD_NUM]; in BENCHMARK_F() local 245 threads[i] = std::thread(PutHandleThreadData, std::ref(demoDatas[i]), i); in BENCHMARK_F() 248 QueueFullHandler(threads, demoDatas, state); in BENCHMARK_F() 255 * @tc.desc: Multi-threaded put() on the empty queue. When n threads ar 261 std::thread threads[THREAD_NUM]; BENCHMARK_F() local 286 std::thread threads[THREAD_NUM]; BENCHMARK_F() local 339 std::thread threads[THREAD_NUM]; BENCHMARK_F() local 390 std::thread threads[THREAD_NUM]; BENCHMARK_F() local 439 std::thread threads[THREAD_NUM]; BENCHMARK_F() local 486 std::thread threads[THREAD_NUM]; BENCHMARK_F() local [all...] |
/commonlibrary/c_utils/base/test/unittest/common/ |
H A D | utils_safe_block_queue_test.cpp | 146 static void ThreadsJoin(std::thread (&threads)[THREAD_NUM]) 148 for (auto& t : threads) { 165 * @tc.desc: Multiple threads put until blocking runs, one thread gets, all threads finish running normally 169 std::thread threads[THREAD_NUM]; in HWTEST_F() local 175 threads[i] = std::thread(PutHandleThreadData, std::ref(demoDatas[i]), i); in HWTEST_F() 178 // 1. queue is full and some threads is blocked in HWTEST_F() 194 // queue is full and some threads is blocked and is not joined in HWTEST_F() 196 ThreadsJoin(threads); in HWTEST_F() 217 * @tc.desc: Multi-threaded put() on the empty queue. When n threads ar 223 std::thread threads[THREAD_NUM]; HWTEST_F() local 289 std::thread threads[THREAD_NUM]; HWTEST_F() local 337 std::thread threads[THREAD_NUM]; HWTEST_F() local 386 std::thread threads[THREAD_NUM]; HWTEST_F() local 442 std::thread threads[THREAD_NUM]; HWTEST_F() local 492 std::thread threads[THREAD_NUM]; HWTEST_F() local [all...] |
H A D | utils_safe_block_queue_tracking.cpp | 155 * @tc.desc: Multiple threads put until blocking runs, one thread gets, all threads finish running normally 159 std::thread threads[THREAD_NUM]; in HWTEST_F() local 172 threads[i] = std::thread(PutHandleThreadData, std::ref(demoDatas[i]), i); in HWTEST_F() 175 // 1. queue is full and some threads is blocked in HWTEST_F() 192 for (auto& t : threads) { in HWTEST_F() 224 * @tc.desc: Multi-threaded put() on the empty queue. When n threads are waiting to reach a certain 230 std::thread threads[THREAD_NUM]; in HWTEST_F() local 241 threads[i] = std::thread(PutHandleThreadDataTime, std::ref(demoDatas[i]), i, system_clock::from_time_t(timeT)); in HWTEST_F() 244 // 3. queue is full and some threads i in HWTEST_F() 310 std::thread threads[THREAD_NUM]; HWTEST_F() local 369 std::thread threads[THREAD_NUM]; HWTEST_F() local 437 std::thread threads[THREAD_NUM]; HWTEST_F() local 512 std::thread threads[THREAD_NUM]; HWTEST_F() local 576 std::thread threads[THREAD_NUM]; HWTEST_F() local [all...] |
H A D | utils_safe_map_test.cpp | 227 * @tc.desc: 100 threads test in iterate operation to rewrite a SafeMap. 237 std::thread threads[THREAD_NUM]; in HWTEST_F() local 255 threads[i] = std::thread(lamfuncIterate, std::ref(demoData), i, system_clock::from_time_t(timeT)); in HWTEST_F() 259 for (auto& t : threads) { in HWTEST_F() 271 * @tc.desc: 100 threads test in writein to the same key of the map, while read at same time and no throw 276 std::thread threads[THREAD_NUM]; in HWTEST_F() local 299 threads[i] = std::thread(lamfuncInsert, std::ref(demoData), key, i, system_clock::from_time_t(timeT)); in HWTEST_F() 304 for (auto& t : threads) { in HWTEST_F() 316 * @tc.desc: 100 threads test in writein to the corresponding key of the map, 322 std::thread threads[THREAD_NU in HWTEST_F() local 410 std::thread threads[THREAD_NUM]; HWTEST_F() local [all...] |
H A D | utils_safe_queue_test.cpp | 94 threads[i] = std::thread(PutHandleThreadDataTime, in AllThreadPut() 103 threads[i] = std::thread(GetHandleThreadDataTime, in AllThreadGet() 140 for (auto &t : threads) in ResetStatus() 148 std::thread threads[THREAD_NUM]; member in OHOS::__anon43::TestThreading 158 * CaseDescription: Multiple threads put , one thread gets, all threads finish running normally 171 // 1. queue is full and some threads is blocked in HWTEST_F() 190 // queue is full and some threads is blocked and is not joined in HWTEST_F() 203 * CaseDescription: Multi-threaded put() and Multi-threaded get() on the empty queue. When all threads are waiting to reach a certain 221 // 1. queue is full and some threads i in HWTEST_F() [all...] |
H A D | utils_refbase_test.cpp | 321 * @tc.desc: Refbase for threads 328 std::vector<std::future<int>> threads; in HWTEST_F() local 330 threads.emplace_back(std::async(RegisterEventThread)); in HWTEST_F() 333 for (auto &f : threads) { in HWTEST_F()
|
/commonlibrary/c_utils/base/test/benchmarktest/safe_block_queue_tracking_benchmark_test/ |
H A D | safe_block_queue_tracking_benchmark_test.cpp | 149 void StartThreads(std::thread (&threads)[THREAD_NUM], 155 threads[i] = std::thread(function, std::ref(demoDatas[i]), i, timeT); 160 void joinAllThreads(std::thread (&threads)[N]) 162 for (auto& t : threads) { 230 * @tc.desc: Multiple threads put until blocking runs, one thread gets, all threads finish running normally 236 std::thread threads[THREAD_NUM]; in BENCHMARK_F() local 249 threads[i] = std::thread(PutHandleThreadData, std::ref(demoDatas[i]), i); in BENCHMARK_F() 252 // 1. queue is full and some threads is blocked in BENCHMARK_F() 270 joinAllThreads(threads); in BENCHMARK_F() 287 std::thread threads[THREAD_NUM]; BENCHMARK_F() local 339 std::thread threads[THREAD_NUM]; BENCHMARK_F() local 390 std::thread threads[THREAD_NUM]; BENCHMARK_F() local 454 std::thread threads[THREAD_NUM]; BENCHMARK_F() local 505 std::thread threads[THREAD_NUM]; BENCHMARK_F() local 556 std::thread threads[THREAD_NUM]; BENCHMARK_F() local [all...] |
/commonlibrary/c_utils/base/test/benchmarktest/safe_map_benchmark_test/ |
H A D | safe_map_benchmark_test.cpp | 408 * @tc.desc: 10 threads test in iterate operation to rewrite a SafeMap. 421 std::thread threads[THREAD_NUM]; in BENCHMARK_F() local 436 threads[i] = std::thread(lamfuncIterate, std::ref(demoData), i, timeT); in BENCHMARK_F() 439 for (auto& t : threads) { in BENCHMARK_F() 460 * @tc.desc: 100 threads test in writein to the same key of the map, while read at same time and no throw 466 std::thread threads[THREAD_NUM]; in BENCHMARK_F() local 487 threads[i] = std::thread(lamfuncInsert, std::ref(demoData), key, i, timeT); in BENCHMARK_F() 491 for (auto& t : threads) { in BENCHMARK_F() 511 * @tc.desc: 100 threads test in writein to the corresponding key of the map, 518 std::thread threads[THREAD_NU in BENCHMARK_F() local 567 std::thread threads[THREAD_NUM]; BENCHMARK_F() local [all...] |
/commonlibrary/c_utils/base/test/benchmarktest/safe_queue_benchmark_test/ |
H A D | safe_queue_benchmark_test.cpp | 146 threads[i] = std::thread(PutHandleThreadDataTime, in AllThreadPut() 154 threads[i] = std::thread(GetHandleThreadDataTime, in AllThreadGet() 163 threads[i] = std::thread(EraseHandleThreadDataTime, in AllThreadErase() 172 threads[i] = std::thread(EmptyHandleThreadDataTime, in AllThreadEmpty() 237 for (auto &t : threads) { in ResetStatus() 244 std::thread threads[THREAD_NUM]; member in OHOS::__anon22::TestThreading 254 * CaseDescription: Multiple threads put, one thread gets, all threads finish running normally 266 // 1. queue is full and some threads is blocked in BENCHMARK_F() 284 // queue is full and some threads i in BENCHMARK_F() [all...] |
/commonlibrary/c_utils/base/test/fuzztest/refbase_fuzzer/ |
H A D | refbase_fuzzer.cpp | 352 vector<thread> threads = vector<thread>(); in RefbaseTestFunc() local 360 threads.push_back(move(threadTmp)); in RefbaseTestFunc() 363 for (thread& th : threads) { in RefbaseTestFunc()
|
/commonlibrary/c_utils/base/test/benchmarktest/refbase_benchmark_test/ |
H A D | refbase_benchmark_test.cpp | 505 * @tc.desc: Refbase for threads 515 std::vector<std::future<int>> threads; in BENCHMARK_F() local 517 threads.emplace_back(std::async(RegisterEventThread)); in BENCHMARK_F() 520 for (auto &f : threads) { in BENCHMARK_F()
|