SourcePro® C++ API Reference Guide

Product Documentation:
   SourcePro C++
Documentation Home
List of all members | Public Member Functions
RWQEPerfTestRunner< T > Class Template Reference

#include <rw/rwtest/perf/RWQEPerfTestRunner.h>

Public Member Functions

 RWQEPerfTestRunner (T test, std::function< void(const RWQEPerfTestResult &)> resultHandler, std::function< void(std::string &)> exceptionHandler, std::function< bool(uint64_t, uint64_t)> stopTest, std::function< void()> barrier=rwqeNoop)
 
void go (const RWQEPerfTestDef &def)
 
void runTest (int64_t iteration)
 

Detailed Description

template<typename T>
class RWQEPerfTestRunner< T >

RWQEPerfTestRunner implements the test iteration loop.

Constructor & Destructor Documentation

template<typename T >
RWQEPerfTestRunner< T >::RWQEPerfTestRunner ( test,
std::function< void(const RWQEPerfTestResult &)>  resultHandler,
std::function< void(std::string &)>  exceptionHandler,
std::function< bool(uint64_t, uint64_t)>  stopTest,
std::function< void()>  barrier = rwqeNoop 
)
inline

Constructs an RWQEPerfTestRunner.

Parameters
testThe test object that will be evaluated.
resultHandlerThe callable object that will be invoked for each completed iteration of the test.
exceptionHandlerThe callable object that will be invoked to capture any exception message information.
stopTestA callable object that will be invoked to determine if the test runner should halt execution when one thread has executed all the iterations it can.
barrierThe callable object that will be invoked in order to synchronize multiple TestRunner objects.

Member Function Documentation

template<typename T >
void RWQEPerfTestRunner< T >::go ( const RWQEPerfTestDef def)
inline

Executes the test iteration loop, based on the test definition def.

template<typename T >
void RWQEPerfTestRunner< T >::runTest ( int64_t  iteration)
inline

Executes the test for the specified iteration iteration. The test object's run() member function will be invoked, and the time required to execute the function will be captured and sent to the result handler callback.

Copyright © 2016 Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Provide feedback to Rogue Wave about its documentation.