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

Method testParallelReadAndWrite

AdsLibTestRef/main.cpp:802–818  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected