| 558 | } |
| 559 | |
| 560 | void testParallelReadAndWrite(const std::string &testname) |
| 561 | { |
| 562 | std::thread threads[96]; |
| 563 | const auto start = std::chrono::high_resolution_clock::now(); |
| 564 | for (auto &t : threads) { |
| 565 | t = std::thread(&TestAdsPerformance::Read, this, 1024); |
| 566 | } |
| 567 | for (auto &t : threads) { |
| 568 | t.join(); |
| 569 | } |
| 570 | const auto end = std::chrono::high_resolution_clock::now(); |
| 571 | const auto tmms = |
| 572 | std::chrono::duration_cast<std::chrono::milliseconds>( |
| 573 | end - start) |
| 574 | .count(); |
| 575 | out << testname << " took " << tmms << "ms\n"; |
| 576 | } |
| 577 | |
| 578 | void testEndurance(const std::string &testname) |
| 579 | { |
nothing calls this directly
no outgoing calls
no test coverage detected