Shkyera Engine
Easy to use, game engine for Python
Loading...
Searching...
No Matches
shkyera::Profiler Class Reference

#include <Profiler.hpp>

Public Types

using BlocksPerThread = std::map< std::thread::id, std::map< std::string, ProfileBlock > >
 

Public Member Functions

void clear ()
 
void addBlock (std::string &&name, std::chrono::nanoseconds time)
 
BlocksPerThread getProfiles ()
 

Static Public Member Functions

static ProfilergetInstance ()
 

Private Member Functions

 Profiler ()=default
 

Private Attributes

std::mutex mMutex
 
BlocksPerThread mProfileBlocks
 

Member Typedef Documentation

◆ BlocksPerThread

using shkyera::Profiler::BlocksPerThread = std::map<std::thread::id, std::map<std::string, ProfileBlock> >

Constructor & Destructor Documentation

◆ Profiler()

shkyera::Profiler::Profiler ( )
privatedefault

Member Function Documentation

◆ addBlock()

void shkyera::Profiler::addBlock ( std::string &&  name,
std::chrono::nanoseconds  time 
)

◆ clear()

void shkyera::Profiler::clear ( )

◆ getInstance()

Profiler & shkyera::Profiler::getInstance ( )
static

◆ getProfiles()

Profiler::BlocksPerThread shkyera::Profiler::getProfiles ( )

Member Data Documentation

◆ mMutex

std::mutex shkyera::Profiler::mMutex
private

◆ mProfileBlocks

BlocksPerThread shkyera::Profiler::mProfileBlocks
private

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