|
libqi-api
release-2.5.3-2016-11-18
|
A class to perform benchmarks. More...
#include <dataperfsuite.hpp>
Public Types | |
| enum | OutputData { OutputData_None = 0, OutputData_Cpu = 1, OutputData_Period = 2, OutputData_MsgPerSecond = 3, OutputData_MsgMBPerSecond = 4 } |
Public Member Functions | |
| DataPerfSuite (const std::string &projectName, const std::string &executableName, OutputData outputData=OutputData_None, const std::string &filename="") | |
| Constructor. More... | |
| ~DataPerfSuite () | |
| Destructor. More... | |
| DataPerfSuite & | operator<< (const DataPerf &data) |
| Overloading used to print data out. More... | |
| void | close () |
| Print end of file and close it. More... | |
| void | flush () |
A class to perform benchmarks.
* This class is used to perform benchmarks.
*
* Use:
* .. highlight:: c++
* :linenothreshold: 1
* DataPerfSuite DPS("My_project, "My_executable", DataPerfSuite::OutputType_Normal, "data.xml");
* { // ...
* }
* DataPerf DP;
* { // ...
* }
* while (true) {
* DP.start();
* { // ...
* } // What I want to measure.
* DP.stop();
* { // ...
* }
* DPS << DP;
* }
*
Definition at line 22 of file dataperfsuite.hpp.
| Enumerator | |
|---|---|
| OutputData_None | |
| OutputData_Cpu | |
| OutputData_Period | |
| OutputData_MsgPerSecond | |
| OutputData_MsgMBPerSecond | |
Definition at line 26 of file dataperfsuite.hpp.
| qi::DataPerfSuite::DataPerfSuite | ( | const std::string & | projectName, |
| const std::string & | executableName, | ||
| OutputData | outputData = OutputData_None, |
||
| const std::string & | filename = "" |
||
| ) |
Constructor.
| projectName | the name of the project being benchmarked |
| executableName | the name of the executable use for benchmarking |
| outputType | type of output |
| filename | filename where store output. Put an empty string to output on stdout |
| qi::DataPerfSuite::~DataPerfSuite | ( | ) |
Destructor.
| qi::DataPerfSuite::close | ( | ) |
Print end of file and close it.
| void qi::DataPerfSuite::flush | ( | ) |
| qi::DataPerfSuite::operator<< | ( | const DataPerf & | data | ) |
Overloading used to print data out.
| data | Data to print out. |