All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
gazebo::util::DiagnosticManager Class Reference

A diagnostic manager class. More...

#include <util/util.hh>

Inheritance diagram for gazebo::util::DiagnosticManager:
Inheritance graph
[legend]

Public Member Functions

std::string GetLabel (int _index) const
 Get a label for a timer.
 
boost::filesystem::path GetLogPath () const
 Get the path in which logs are stored.
 
common::Time GetTime (int _index) const
 Get the time of a timer instance.
 
common::Time GetTime (const std::string &_label) const
 Get a time based on a label.
 
int GetTimerCount () const
 Get the number of timers.
 
void Init (const std::string &_worldName)
 Initialize to report diagnostics about a world.
 
void Lap (const std::string &_name, const std::string &_prefix)
 Output the current elapsed time of an active timer with a prefix string.
 
void StartTimer (const std::string &_name)
 Start a new timer instance.
 
void StopTimer (const std::string &_name)
 Stop a currently running timer.
 

Additional Inherited Members

- Static Public Member Functions inherited from SingletonT< T >
static T * Instance ()
 Get an instance of the singleton.
 
- Protected Member Functions inherited from SingletonT< T >
 SingletonT ()
 Constructor.
 
virtual ~SingletonT ()
 Destructor.
 

Detailed Description

A diagnostic manager class.

Member Function Documentation

std::string gazebo::util::DiagnosticManager::GetLabel ( int  _index) const

Get a label for a timer.

Parameters
[in]_indexIndex of a timer instance
Returns
Label of the specified timer
boost::filesystem::path gazebo::util::DiagnosticManager::GetLogPath ( ) const

Get the path in which logs are stored.

Returns
The path in which logs are stored.
common::Time gazebo::util::DiagnosticManager::GetTime ( int  _index) const

Get the time of a timer instance.

Parameters
[in]_indexThe index of a timer instance
Returns
Time of the specified timer
common::Time gazebo::util::DiagnosticManager::GetTime ( const std::string &  _label) const

Get a time based on a label.

Parameters
[in]_labelName of the timer instance
Returns
Time of the specified timer
int gazebo::util::DiagnosticManager::GetTimerCount ( ) const

Get the number of timers.

Returns
The number of timers
void gazebo::util::DiagnosticManager::Init ( const std::string &  _worldName)

Initialize to report diagnostics about a world.

Parameters
[in]_worldNameName of the world.
void gazebo::util::DiagnosticManager::Lap ( const std::string &  _name,
const std::string &  _prefix 
)

Output the current elapsed time of an active timer with a prefix string.

This also resets the timer and keeps it running.

Parameters
[in]_nameName of the timer to access.
[in]_prefixInformational string that is output with the elapsed time.
void gazebo::util::DiagnosticManager::StartTimer ( const std::string &  _name)

Start a new timer instance.

Parameters
[in]_nameName of the timer.
Returns
A pointer to the new diagnostic timer
void gazebo::util::DiagnosticManager::StopTimer ( const std::string &  _name)

Stop a currently running timer.

Parameters
[in]_nameName of the timer to stop.

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