libqi-api  2.8.7.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
dataperfsuite.hpp
Go to the documentation of this file.
1 /*
2 ** Author(s):
3 ** - Nicolas Cornu <ncornu@aldebaran-robotics.com>
4 **
5 ** Copyright (C) 2012-2013 Aldebaran Robotics
6 */
7 
8 #pragma once
9 #ifndef _QI_PERF_DATAPERFSUITE_HPP_
10 #define _QI_PERF_DATAPERFSUITE_HPP_
11 
12 #include <string>
13 
14 #include <qi/api.hpp>
15 #include <qi/perf/dataperf.hpp>
16 
17 namespace qi
18 {
19  class DataPerfSuitePrivate;
20 
23  {
24  public:
25 
26  enum OutputData {
27  OutputData_None = 0,
28  OutputData_Cpu = 1,
29  OutputData_Period = 2,
30  OutputData_MsgPerSecond = 3,
31  OutputData_MsgMBPerSecond = 4
32  };
33 
35  DataPerfSuite(const std::string& projectName, const std::string& executableName, OutputData outputData = OutputData_None, const std::string& filename = "");
36 
38  ~DataPerfSuite();
39 
41  DataPerfSuite& operator<<(const DataPerf& data);
42 
44  void close();
45 
46  void flush();
47 
48  private:
49  DataPerfSuitePrivate *_p;
50  };
51 }
52 
54 
55 #endif // _QI_PERF_DATAPERFSUITE_HPP_
#define QI_API
Definition: api.hpp:33
std::ostream & operator<<(std::ostream &o, FutureState x)
Definition: future_fwd.hpp:90
dll import/export and compiler message
A class to perform benchmarks.
void flush()
Flush asynchronous logs.
Class to compute and store a benchmark time.
Definition: dataperf.hpp:21