Jolt Physics
A multi core friendly Game Physics Engine
Loading...
Searching...
No Matches
Profiler Class Reference

Singleton class for managing profiling information. More...

#include <Profiler.h>

Inheritance diagram for Profiler:
NonCopyable

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.
 
- Public Member Functions inherited from NonCopyable
 NonCopyable ()=default
 
 NonCopyable (const NonCopyable &)=delete
 
void operator= (const NonCopyable &)=delete
 

Static Public Attributes

static ProfilersInstance = nullptr
 Singleton instance.
 

Detailed Description

Singleton class for managing profiling information.

Constructor & Destructor Documentation

◆ Profiler()

JPH_OVERRIDE_NEW_DELETE Profiler::Profiler ( )
inline

Constructor.

Member Function Documentation

◆ AddThread()

void Profiler::AddThread ( ProfileThread * inThread)

Add a thread to be instrumented.

◆ Dump()

void Profiler::Dump ( const string_view & inTag = string_view())

Dump profiling statistics at the start of the next frame

Parameters
inTagIf not empty, this overrides the auto incrementing number in the filename of the dump file

◆ GetProcessorTicksPerSecond()

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.

◆ NextFrame()

JPH_TSAN_NO_SANITIZE void Profiler::NextFrame ( )

Increments the frame counter to provide statistics per frame.

◆ RemoveThread()

void Profiler::RemoveThread ( ProfileThread * inThread)

Remove a thread from being instrumented.

Member Data Documentation

◆ sInstance

Singleton instance.


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