| 800 | } |
| 801 | |
| 802 | void testParallelReadAndWrite(const std::string &testname) |
| 803 | { |
| 804 | std::thread threads[96]; |
| 805 | const auto start = std::chrono::high_resolution_clock::now(); |
| 806 | for (auto &t : threads) { |
| 807 | t = std::thread(&TestAdsPerformance::Read, this, 1024); |
| 808 | } |
| 809 | for (auto &t : threads) { |
| 810 | t.join(); |
| 811 | } |
| 812 | const auto end = std::chrono::high_resolution_clock::now(); |
| 813 | const auto tmms = |
| 814 | std::chrono::duration_cast<std::chrono::milliseconds>( |
| 815 | end - start) |
| 816 | .count(); |
| 817 | out << testname << " took " << tmms << "ms\n"; |
| 818 | } |
| 819 | |
| 820 | void testEndurance(const std::string &testname) |
| 821 | { |
nothing calls this directly
no outgoing calls
no test coverage detected