Used to perform application-wide performance profiling. More...
|void||BeginSample (const char *_name, uint32_t *_hash=nullptr)|
|Begin a named profiling sample. Begins a CPU profiler sample with a given name. Can optionally take a hash parameter to be cached between executions of |
|End a profiling sample. More...|
|std::string||ImplementationName () const|
|Get the underlying profiler implentation name. More...|
|void||LogText (const char *_text)|
|Log text to profiler output (if supported) If the underlying profiler implementation supports additional log messages, this can be used to send. More...|
|void||SetThreadName (const char *_name)|
|Set the name of the current thread. More...|
|bool||Valid () const|
|Detect if profiler is enabled and has an implementation. More...|
|Protected Member Functions inherited from SingletonT< Profiler >|
|Static Public Member Functions inherited from SingletonT< Profiler >|
|static Profiler *||Instance ()|
|Get an instance of the singleton. More...|
Used to perform application-wide performance profiling.
This class provides the necessary infrastructure for recording profiling information of an application while it is running. The actual profiler implementation can be choosen at runtime, and is invoked through a series of macros found below.
In general, users shouldn't directly interface with this class, but instead use the profiling macros, which can be enabled/disabled at compile time, which eliminates any performance impact of profiling.
Profiler is enabled by setting IGN_ENABLE_PROFILER at compile time.
The profiler header also exports several convenience macros to make adding inspection points easier.
- IGN_PROFILE_THREAD_NAME - Set the name of the current profiled thread.
- IGN_PROFILE_LOG_TEXT - Log text to the profiler console (if supported)
- IGN_PROFILE_BEGIN - Begin a named profile sample
- IGN_PROFILE_END - End a named profile sample
- IGN_PROFILE - RAII-style profile sample. The sample will end at the end of the current scope.
Constructor & Destructor Documentation
Member Function Documentation
|void BeginSample||(||const char *||_name,|
|uint32_t *||_hash =
Begin a named profiling sample. Begins a CPU profiler sample with a given name. Can optionally take a hash parameter to be cached between executions of
BeginSample, so that hashes don't need to be recomputed.
[in] _name Name of the sample [in,out] _hash An optional hash value that can be cached between executions.
Referenced by ScopedProfile::ScopedProfile().
End a profiling sample.
Referenced by ScopedProfile::~ScopedProfile().
Get the underlying profiler implentation name.
|void LogText||(||const char *||_text||)|
Log text to profiler output (if supported) If the underlying profiler implementation supports additional log messages, this can be used to send.
Currently, the Remotery implentation supports this functionality.
[in] _text Text to log.
|void SetThreadName||(||const char *||_name||)|
Set the name of the current thread.
[in] _name Name to set
Detect if profiler is enabled and has an implementation.
The documentation for this class was generated from the following file: