Open 3D Engine Profiler Gem API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
Profiler::CpuProfiler Class Referencefinal

#include <CpuProfiler.h>

Inherits AZ::Debug::Profiler, and AZ::SystemTickBus::Handler.

Public Member Functions

 AZ_RTTI (CpuProfiler, "{10E9D394-FC83-4B45-B2B8-807C6BF07BF0}", AZ::Debug::Profiler)
 
 AZ_CLASS_ALLOCATOR (CpuProfiler, AZ::SystemAllocator)
 
void Init ()
 Registers/un-registers the AZ::Debug::Profiler instance to the interface.
 
void Shutdown ()
 
void BeginRegion (const AZ::Debug::Budget *budget, const char *eventName, size_t eventNameArgCount,...) final override
 AZ::Debug::Profiler overrides...
 
void EndRegion (const AZ::Debug::Budget *budget) final override
 
const TimeRegionMap & GetTimeRegionMap () const
 Get the last frame's TimeRegionMap.
 
bool BeginContinuousCapture ()
 Starting/ending a multi-frame capture of profiling data.
 
bool EndContinuousCapture (AZStd::ring_buffer< TimeRegionMap > &flushTarget)
 
bool IsContinuousCaptureInProgress () const
 
void SetProfilerEnabled (bool enabled)
 Getter/setter for the profiler active state.
 
bool IsProfilerEnabled () const
 
void OnSystemTick () final override
 

Friends

class CpuTimingLocalStorage
 

Detailed Description

CpuProfiler will keep track of the registered threads, and forwards the request to profile a region to the appropriate thread. The user is able to request all cached regions, which are stored on a per thread frequency.

Member Function Documentation

◆ IsContinuousCaptureInProgress()

bool Profiler::CpuProfiler::IsContinuousCaptureInProgress ( ) const

Check to see if a programmatic capture is currently in progress, implies that the profiler is active if returns True.

◆ OnSystemTick()

void Profiler::CpuProfiler::OnSystemTick ( )
finaloverride

AZ::SystemTickBus::Handler overrides When fired, the profiler collects all profiling data from registered threads and updates m_timeRegionMap so that the next frame has up-to-date profiling data.


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