DiagnosticManager Class Reference

A diagnostic manager class. More...

#include <util/util.hh>

Inherits SingletonT< DiagnosticManager >.

Public Member Functions

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

Static Public Member Functions

static DiagnosticManagerInstance ()
 Get an instance of the singleton. More...
 

Detailed Description

A diagnostic manager class.

Member Function Documentation

§ GetLabel()

std::string GetLabel ( int  _index) const

Get a label for a timer.

Parameters
[in]_indexIndex of a timer instance
Returns
Label of the specified timer
Deprecated:
See Label(const int) const

§ GetLogPath()

boost::filesystem::path GetLogPath ( ) const

Get the path in which logs are stored.

Returns
The path in which logs are stored.
Deprecated:
See LogPath() const

§ GetTime() [1/2]

common::Time 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
Deprecated:
See Time(const int) const;

§ GetTime() [2/2]

common::Time 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
Deprecated:
See Time(const std::string &_label) const

§ GetTimerCount()

int GetTimerCount ( ) const

Get the number of timers.

Returns
The number of timers
Deprecated:
See TimerCount() const

§ Init()

void Init ( const std::string &  _worldName)

Initialize to report diagnostics about a world.

Parameters
[in]_worldNameName of the world.

§ Instance()

static DiagnosticManager * Instance ( )
inlinestaticinherited

Get an instance of the singleton.

§ Label()

std::string Label ( const int  _index) const

Get a label for a timer.

Parameters
[in]_indexIndex of a timer instance
Returns
Label of the specified timer

§ Lap()

void 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.

§ LogPath()

boost::filesystem::path LogPath ( ) const

Get the path in which logs are stored.

Returns
The path in which logs are stored.

§ StartTimer()

void StartTimer ( const std::string &  _name)

Start a new timer instance.

Parameters
[in]_nameName of the timer.
Returns
A pointer to the new diagnostic timer

§ StopTimer()

void StopTimer ( const std::string &  _name)

Stop a currently running timer.

Parameters
[in]_nameName of the timer to stop.

§ Time() [1/2]

common::Time Time ( const int  _index) const

Get the time of a timer instance.

Parameters
[in]_indexThe index of a timer instance
Returns
Time of the specified timer

§ Time() [2/2]

common::Time Time ( 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

§ TimerCount()

int TimerCount ( ) const

Get the number of timers.

Returns
The number of timers

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