42#include <boost/test/unit_test.hpp>
43#include <boost/filesystem.hpp>
59 double totalSeconds =
measureReadLatency(aClient, aBaseAddr, aDepth, aNrIterations, aDispatchEachIteration,
false);
60 double totalPayloadKB = aNrIterations * aDepth * 4. / 1024.;
61 double dataRateKB_s = totalPayloadKB/totalSeconds;
62 std::cout <<
" --> " << aNrIterations <<
" reads, each " << aDepth <<
" x 32-bit words, took " << totalSeconds <<
" seconds" << std::endl
63 <<
"Total IPbus payload received = " << totalPayloadKB <<
" KB\n"
64 <<
"Average read bandwidth = " << dataRateKB_s <<
" KB/s" << std::endl;
70 double totalSeconds =
measureWriteLatency(aClient, aBaseAddr, aDepth, aNrIterations, aDispatchEachIteration,
false);
71 double totalPayloadKB = aNrIterations * aDepth * 4. / 1024.;
72 double dataRateKB_s = totalPayloadKB/totalSeconds;
73 std::cout <<
" --> " << aNrIterations <<
" writes, each " << aDepth <<
" x 32-bit words, took " << totalSeconds <<
" seconds" << std::endl
74 <<
"Total IPbus payload received = " << totalPayloadKB <<
" KB\n"
75 <<
"Average read bandwidth = " << dataRateKB_s <<
" KB/s" << std::endl;
83 BOOST_TEST_MESSAGE(
" *** Skipping soak tests since '--quick' flag was used ***");
97 BOOST_TEST_MESSAGE(
" *** Skipping soak tests since '--quick' flag was used ***");
112 BOOST_TEST_MESSAGE(
" *** Skipping soak tests since '--quick' flag was used ***");
114 HwInterface
hw = getHwInterface();
116 std::vector<ClientInterface*> lClients;
An abstract base class for defining the interface to the various IPbus clients as well as providing t...
A class which bundles a node tree and an IPbus client interface together providing everything you nee...
ClientInterface & getClient()
Get the underlying IPbus client.
static bool runValidationTest(const std::vector< ClientInterface * > &aClients, const uint32_t aBaseAddr, const uint32_t aDepth, const size_t aNrIterations, const bool aDispatchEachIteration, const bool aVerbose)
None tests(nox.Session session)
BOOST_CHECK_NO_THROW(hw.getNode("REG").writeBlock(xx))
BOOST_CHECK(!mem.valid())
double measureReadLatency(ClientInterface &aClient, uint32_t aBaseAddr, uint32_t aDepth, size_t aNrIterations, bool aDispatchEachIteration, bool aVerbose)
void report_rx_performance(ClientInterface &aClient, const uint32_t aBaseAddr, const uint32_t aDepth, const size_t aNrIterations, const bool aDispatchEachIteration)
void report_tx_performance(ClientInterface &aClient, const uint32_t aBaseAddr, const uint32_t aDepth, const size_t aNrIterations, const bool aDispatchEachIteration)
double measureWriteLatency(ClientInterface &aClient, uint32_t aBaseAddr, uint32_t aDepth, size_t aNrIterations, bool aDispatchEachIteration, bool aVerbose)
#define UHAL_TESTS_DEFINE_CLIENT_TEST_CASES(test_suite_name, test_case_name, test_fixture, test_case_contents)