17 #ifndef _GAZEBO_UTIL_DIAGNOSTICMANAGER_HH_ 
   18 #define _GAZEBO_UTIL_DIAGNOSTICMANAGER_HH_ 
   21 #include <boost/filesystem.hpp> 
   23 #include "gazebo/gazebo_config.h" 
   37     class DiagnosticManagerPrivate;
 
   40     class DiagnosticTimerPrivate;
 
   47 #ifdef ENABLE_DIAGNOSTICS 
   48     #define DIAG_TIMER_START(_name) \ 
   52     gazebo::util::DiagnosticManager::Instance()->StartTimer(_name); 
   59     #define DIAG_TIMER_LAP(_name, _prefix) \ 
   60     gazebo::util::DiagnosticManager::Instance()->Lap(_name, _prefix); 
   64     #define DIAG_TIMER_STOP(_name) \ 
   65     gazebo::util::DiagnosticManager::Instance()->StopTimer(_name); 
   67     #define DIAG_TIMER_START(_name) ((void) 0) 
   68     #define DIAG_TIMER_LAP(_name, _prefix) ((void)0) 
   69     #define DIAG_TIMER_STOP(_name) ((void) 0) 
   85       public: 
void Init(
const std::string &_worldName);
 
   90       public: 
void StartTimer(
const std::string &_name);
 
   94       public: 
void StopTimer(
const std::string &_name);
 
  101       public: 
void Lap(
const std::string &_name, 
const std::string &_prefix);
 
  105       public: 
int TimerCount() 
const;
 
  115       public: 
common::Time Time(
const std::string &_label) 
const;
 
  120       public: std::string Label(
const int _index) 
const;
 
  124       public: boost::filesystem::path LogPath() 
const;
 
  135       private: 
void AddTime(
const std::string &_name,
 
  147       private: std::unique_ptr<DiagnosticManagerPrivate> dataPtr;
 
  163       public: 
void Lap(
const std::string &_prefix);
 
  166       public: 
virtual void Start();
 
  169       public: 
virtual void Stop();
 
  173       public: 
const std::string Name() 
const;
 
  177       private: std::unique_ptr<DiagnosticTimerPrivate> dataPtr;
 
Singleton template class. 
Definition: SingletonT.hh:33
A diagnostic manager class. 
Definition: Diagnostics.hh:74
Information for use in an update event. 
Definition: UpdateInfo.hh:30
A timer class, used to time things in real world walltime. 
Definition: Timer.hh:38
A timer designed for diagnostics. 
Definition: Diagnostics.hh:152
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message. 
A Time class, can be used to hold wall- or sim-time. 
Definition: Time.hh:44