MCPcopy Create free account
hub / github.com/Beckhoff/ADS / testManyNotifications

Method testManyNotifications

AdsLibTestRef/main.cpp:780–800  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

778 }
779
780 void testManyNotifications(const std::string &testname)
781 {
782 std::thread threads[8];
783 g_NumNotifications = 0;
784 const auto start = std::chrono::high_resolution_clock::now();
785 for (auto &t : threads) {
786 t = std::thread(&TestAdsPerformance::Notifications,
787 this, 1024);
788 }
789 for (auto &t : threads) {
790 t.join();
791 }
792 const auto end = std::chrono::high_resolution_clock::now();
793 const auto tmms =
794 std::chrono::duration_cast<std::chrono::milliseconds>(
795 end - start)
796 .count();
797 out << testname << ' ' << g_NumNotifications / tmms
798 << " notifications/ms (" << g_NumNotifications << '/'
799 << tmms << ")\n";
800 }
801
802 void testParallelReadAndWrite(const std::string &testname)
803 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected