Gazebo Common

API Reference

5.7.0
ScopedProfile Class Reference

Used to provide C++ RAII-style profiling sample. The sample will start on the construction of the ScopedProfile object and stop when the object leaves scope. More...

#include <Profiler.hh>

Public Member Functions

 ScopedProfile (const char *_name, uint32_t *_hash)
 Constructor. Starts profile sample. More...
 
 ~ScopedProfile ()
 Destructor. Stops profile sample. More...
 

Detailed Description

Used to provide C++ RAII-style profiling sample. The sample will start on the construction of the ScopedProfile object and stop when the object leaves scope.

Constructor & Destructor Documentation

◆ ScopedProfile()

ScopedProfile ( const char *  _name,
uint32_t *  _hash 
)
inline

Constructor. Starts profile sample.

Parameters
[in]_nameName of the sample
[in,out]_hashAn optional hash value that can be cached between executions.

References Profiler::BeginSample(), and SingletonT< Profiler >::Instance().

◆ ~ScopedProfile()

~ScopedProfile ( )
inline

Destructor. Stops profile sample.

References Profiler::EndSample(), and SingletonT< Profiler >::Instance().


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