35 #ifndef _uhal_tests_tools_hpp_
36 #define _uhal_tests_tools_hpp_
45 #include <boost/scoped_ptr.hpp>
46 #include <boost/thread/thread.hpp>
57 class DummyHardwareInterface;
64 void setReplyDelay (
const boost::chrono::microseconds& aDelay);
67 boost::scoped_ptr<DummyHardwareInterface>
mHw;
79 gettimeofday ( &
m_start, NULL );
86 gettimeofday ( &now, NULL );
89 return static_cast<double> (
sec +
usec/1000000. );
100 double measureReadLatency(
const std::vector<ClientInterface*>& aClients, uint32_t aBaseAddr, uint32_t aDepth,
size_t aNrIterations,
bool aDispatchEachIteration,
bool aVerbose);
104 double measureWriteLatency(
const std::vector<ClientInterface*>& aClients, uint32_t aBaseAddr, uint32_t aDepth,
size_t aNrIterations,
bool aDispatchEachIteration,
bool aVerbose);
106 double measureFileReadLatency(
const std::string& aFilePath, uint32_t aBaseAddr, uint32_t aDepth,
size_t aNrIterations,
bool aVerbose);
108 double measureFileWriteLatency(
const std::string& aFilePath, uint32_t aBaseAddr, uint32_t aDepth,
size_t aNrIterations,
bool aVerbose);