libqi-api  2.8.7.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
dataperf.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_DATAPERF_HPP_
10 #define _QI_PERF_DATAPERF_HPP_
11 
12 #include <string>
13 
14 #include <qi/api.hpp>
15 
16 namespace qi
17 {
18  class DataPerfPrivate;
19 
22  {
23  public:
25  DataPerf();
27  ~DataPerf();
28 
30  void start(const std::string& benchmarkName, unsigned long loopCount = 1, unsigned long msgSize = 0, const std::string& variable = "");
32  void stop();
33 
35  std::string getBenchmarkName() const;
37  std::string getVariable() const;
39  unsigned long getMsgSize() const;
41  double getPeriod() const;
43  double getCpu() const;
45  double getMsgPerSecond() const;
47  double getMegaBytePerSecond() const;
48 
49  private:
50  DataPerfPrivate *_p;
51  };
52 }
53 
54 
55 #endif // _QI_PERF_DATAPERF_HPP_
#define QI_API
Definition: api.hpp:33
dll import/export and compiler message
Class to compute and store a benchmark time.
Definition: dataperf.hpp:21