![]() |
Jolt Physics
A multi core friendly Game Physics Engine
|
Singleton class for managing profiling information. More...
#include <Profiler.h>
Public Member Functions | |
JPH_OVERRIDE_NEW_DELETE | Profiler () |
Constructor. | |
void | NextFrame () |
Increments the frame counter to provide statistics per frame. | |
void | Dump (const string_view &inTag=string_view()) |
void | AddThread (ProfileThread *inThread) |
Add a thread to be instrumented. | |
void | RemoveThread (ProfileThread *inThread) |
Remove a thread from being instrumented. | |
uint64 | GetProcessorTicksPerSecond () const |
Get the amount of ticks per second, note that this number will never be fully accurate as the amount of ticks per second may vary with CPU load, so this number is only to be used to give an indication of time for profiling purposes. | |
![]() | |
NonCopyable ()=default | |
NonCopyable (const NonCopyable &)=delete | |
void | operator= (const NonCopyable &)=delete |
Static Public Attributes | |
static Profiler * | sInstance = nullptr |
Singleton instance. | |
Singleton class for managing profiling information.
|
inline |
Constructor.
void Profiler::AddThread | ( | ProfileThread * | inThread | ) |
Add a thread to be instrumented.
void Profiler::Dump | ( | const string_view & | inTag = string_view() | ) |
Dump profiling statistics at the start of the next frame
inTag | If not empty, this overrides the auto incrementing number in the filename of the dump file |
uint64 Profiler::GetProcessorTicksPerSecond | ( | ) | const |
Get the amount of ticks per second, note that this number will never be fully accurate as the amount of ticks per second may vary with CPU load, so this number is only to be used to give an indication of time for profiling purposes.
JPH_TSAN_NO_SANITIZE void Profiler::NextFrame | ( | ) |
Increments the frame counter to provide statistics per frame.
void Profiler::RemoveThread | ( | ProfileThread * | inThread | ) |
Remove a thread from being instrumented.
|
static |
Singleton instance.