35#ifndef _uhal_tests_tools_hpp_
36#define _uhal_tests_tools_hpp_
57class DummyHardwareInterface;
67 std::unique_ptr<DummyHardwareInterface>
mHw;
79 gettimeofday ( &
m_start, NULL );
86 gettimeofday ( &now, NULL );
89 return static_cast<double> (
sec +
usec/1000000. );
100double measureReadLatency(
const std::vector<ClientInterface*>& aClients, uint32_t aBaseAddr, uint32_t aDepth,
size_t aNrIterations,
bool aDispatchEachIteration,
bool aVerbose);
104double measureWriteLatency(
const std::vector<ClientInterface*>& aClients, uint32_t aBaseAddr, uint32_t aDepth,
size_t aNrIterations,
bool aDispatchEachIteration,
bool aVerbose);
106double measureFileReadLatency(
const std::string& aFilePath, uint32_t aBaseAddr, uint32_t aDepth,
size_t aNrIterations,
bool aVerbose);
108double measureFileWriteLatency(
const std::string& aFilePath, uint32_t aBaseAddr, uint32_t aDepth,
size_t aNrIterations,
bool aVerbose);
An abstract base class for defining the interface to the various IPbus clients as well as providing t...
Common abstract base class for IPbus 1.3 and 2.0 dummy hardware.
void setReplyDelay(const std::chrono::microseconds &aDelay)
std::unique_ptr< DummyHardwareInterface > mHw
double elapsedSeconds()
Returns number of elapsed seconds since the timer was instantiated.
None tests(nox.Session session)
double measureFileWriteLatency(const std::string &aFilePath, uint32_t aBaseAddr, uint32_t aDepth, size_t aNrIterations, bool aVerbose)
double measureReadLatency(ClientInterface &aClient, uint32_t aBaseAddr, uint32_t aDepth, size_t aNrIterations, bool aDispatchEachIteration, bool aVerbose)
double measureFileReadLatency(const std::string &aFilePath, uint32_t aBaseAddr, uint32_t aDepth, size_t aNrIterations, bool aVerbose)
double measureWriteLatency(ClientInterface &aClient, uint32_t aBaseAddr, uint32_t aDepth, size_t aNrIterations, bool aDispatchEachIteration, bool aVerbose)
@ sec
seconds past the minute formatted as two digits e.g.
@ usec
microseconds past the second formatted as exactly six digits e.g.