libqi-api  2.8.7.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
qi::DataPerf Class Reference

Class to compute and store a benchmark time. More...

#include <dataperf.hpp>

Public Member Functions

 DataPerf ()
 Default constructor. More...
 
 ~DataPerf ()
 Default destructor. More...
 
void start (const std::string &benchmarkName, unsigned long loopCount=1, unsigned long msgSize=0, const std::string &variable="")
 Start measuring time. More...
 
void stop ()
 Stop measuring time. More...
 
std::string getBenchmarkName () const
 Return the name of the benchmark. More...
 
std::string getVariable () const
 Return the variable of the benchmark. More...
 
unsigned long getMsgSize () const
 Return the size of message transmitted. More...
 
double getPeriod () const
 Return the average time taken by a single execution of the benchmarked code. More...
 
double getCpu () const
 Return the time take by the CPU against the total time. More...
 
double getMsgPerSecond () const
 Return the number of messages transmitted in a single second. More...
 
double getMegaBytePerSecond () const
 Return the MB transmitted in a single second. More...
 

Detailed Description

Class to compute and store a benchmark time.

Definition at line 21 of file dataperf.hpp.

Constructor & Destructor Documentation

DataPerf::DataPerf ( )

Default constructor.

DataPerf::~DataPerf ( )

Default destructor.

Member Function Documentation

DataPerf::getBenchmarkName ( ) const

Return the name of the benchmark.

Returns
A string with the name of the benchmark.
DataPerf::getCpu ( ) const

Return the time take by the CPU against the total time.

Returns
Percentage of CPU/Total.
DataPerf::getMegaBytePerSecond ( ) const

Return the MB transmitted in a single second.

Returns
The size in MB in a second.
DataPerf::getMsgPerSecond ( ) const

Return the number of messages transmitted in a single second.

Returns
the number of messages in a second.
DataPerf::getMsgSize ( ) const

Return the size of message transmitted.

Returns
The size.
DataPerf::getPeriod ( ) const

Return the average time taken by a single execution of the benchmarked code.

Returns
The time.
std::string qi::DataPerf::getVariable ( ) const

Return the variable of the benchmark.

DataPerf::start ( const std::string &  benchmarkName,
unsigned long  loopCount = 1,
unsigned long  msgSize = 0,
const std::string &  variable = "" 
)

Start measuring time.

* This function is used to start measuring time.
* 
Parameters
benchmarkNameName of the benchmark (generally what this bencks measure).
loopCountHow many time benchmarked code have been loop (used for calculus).
msgSizeThe size of the data transmitted (used for calculus).
DataPerf::stop ( )

Stop measuring time.


The documentation for this class was generated from the following files: