| 996 | } |
| 997 | |
| 998 | void testManyNotifications(const std::string &testname) |
| 999 | { |
| 1000 | std::thread threads[8]; |
| 1001 | g_NumNotifications = 0; |
| 1002 | const auto start = std::chrono::high_resolution_clock::now(); |
| 1003 | for (auto &t : threads) { |
| 1004 | t = std::thread(&TestAdsPerformance::Notifications, |
| 1005 | this, 1024); |
| 1006 | } |
| 1007 | for (auto &t : threads) { |
| 1008 | t.join(); |
| 1009 | } |
| 1010 | const auto end = std::chrono::high_resolution_clock::now(); |
| 1011 | const auto tmms = |
| 1012 | std::chrono::duration_cast<std::chrono::milliseconds>( |
| 1013 | end - start) |
| 1014 | .count(); |
| 1015 | out << testname << ' ' << g_NumNotifications / tmms |
| 1016 | << " notifications/ms (" << g_NumNotifications << '/' |
| 1017 | << tmms << ")\n"; |
| 1018 | } |
| 1019 | |
| 1020 | void testParallelReadAndWrite(const std::string &testname) |
| 1021 | { |
nothing calls this directly
no outgoing calls
no test coverage detected