Plasma Engine  2.0
Loading...
Searching...
No Matches
plProfilingSystem Class Reference

Helper functionality of the profiling system. More...

#include <Profiling.h>

Classes

struct  CPUScope
 
struct  CPUScopesBufferFlat
 
struct  GPUScope
 Helper struct to hold GPU profiling data. More...
 
struct  ProfilingData
 
struct  ThreadInfo
 

Public Types

using ScopeTimeoutDelegate = plDelegate<void(plStringView sName, plStringView sFunctionName, plTime duration)>
 

Static Public Member Functions

static void Clear ()
 
static void Capture (plProfilingSystem::ProfilingData &out_capture, bool bClearAfterCapture=false)
 
static void SetDiscardThreshold (plTime threshold)
 Scopes are discarded if their duration is shorter than the specified threshold. Default is 0.1ms.
 
static void SetScopeTimeoutCallback (ScopeTimeoutDelegate callback)
 Sets a callback that is triggered when a profiling scope takes longer than desired.
 
static void StartNewFrame ()
 Should be called once per frame to capture the timestamp of the new frame.
 
static void AddCPUScope (plStringView sName, const char *szFunctionName, plTime beginTime, plTime endTime, plTime scopeTimeout)
 Adds a new scoped event for the calling thread in the profiling system.
 
static plUInt64 GetFrameCount ()
 Get current frame counter.
 
static void InitializeGPUData (plUInt32 uiGpuCount=1)
 Initialized internal data structures for GPU profiling data. Needs to be called before adding any data.
 
static void AddGPUScope (plStringView sName, plTime beginTime, plTime endTime, plUInt32 uiGpuIndex=0)
 Adds a GPU profiling scope in the internal event ringbuffer.
 

Friends

plUInt32 RunThread (plThread *pThread)
 

Detailed Description

Helper functionality of the profiling system.


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