Unravel Engine C++ Reference
Loading...
Searching...
No Matches
unravel::performance_profiler Class Reference

#include <profiler.h>

Classes

struct  per_frame_data
 

Public Types

using record_data_t = std::map<hpp::string_view, per_frame_data>
 

Public Member Functions

template<typename T >
void add_record (T &&name, float time)
 Add performance record using string literal only.
 
void swap ()
 
auto get_per_frame_data_read () const -> const record_data_t &
 
auto get_per_frame_data_write () -> record_data_t &
 

Friends

class scope_perf_timer
 

Detailed Description

Definition at line 21 of file profiler.h.

Member Typedef Documentation

◆ record_data_t

using unravel::performance_profiler::record_data_t = std::map<hpp::string_view, per_frame_data>

Definition at line 45 of file profiler.h.

Member Function Documentation

◆ add_record()

template<typename T >
void unravel::performance_profiler::add_record ( T && name,
float time )
inline

Add performance record using string literal only.

Only accepts string literals to ensure lifetime safety since we store non-owning pointers

Parameters
nameString literal name for the performance record
timeTime value in milliseconds

Definition at line 52 of file profiler.h.

◆ get_per_frame_data_read()

auto unravel::performance_profiler::get_per_frame_data_read ( ) const -> const record_data_t&
inline

Definition at line 66 of file profiler.h.

◆ get_per_frame_data_write()

auto unravel::performance_profiler::get_per_frame_data_write ( ) -> record_data_t&
inline

Definition at line 71 of file profiler.h.

◆ swap()

void unravel::performance_profiler::swap ( )
inline

Definition at line 60 of file profiler.h.

Friends And Related Symbol Documentation

◆ scope_perf_timer

friend class scope_perf_timer
friend

Definition at line 97 of file profiler.h.


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