#include <profiler.h>
Collaboration diagram for Profiler:Classes | |
| struct | DataPair |
Public Types | |
| typedef std::map< std::string, float > | GraphValues |
Public Member Functions | |
| Profiler () | |
| void | add (const std::string &name, float value) |
| void | avg (const std::string &name, float value) |
| void | max (const std::string &name, float value) |
| void | clear () |
| float | getValue (const std::string &name) const |
| int | getAvgCount (const std::string &name) const |
| u64 | getElapsedMs () const |
| int | print (std::ostream &o, u32 page=1, u32 pagecount=1) |
| void | getPage (GraphValues &o, u32 page, u32 pagecount) |
| void | graphSet (const std::string &id, float value) |
| void | graphAdd (const std::string &id, float value) |
| void | graphPop (GraphValues &result) |
| void | remove (const std::string &name) |
Private Attributes | |
| std::mutex | m_mutex |
| std::map< std::string, DataPair > | m_data |
| std::map< std::string, float > | m_graphvalues |
| u64 | m_start_time |
| typedef std::map<std::string, float> Profiler::GraphValues |
| Profiler::Profiler | ( | ) |
| void Profiler::add | ( | const std::string & | name, |
| float | value ) |
References m_data, m_mutex, and SPT_ADD.
Referenced by ScopeProfiler::~ScopeProfiler(), Server::AsyncRunStep(), EmergeThread::run(), ServerMap::save(), and Map::timerUpdate().
Here is the caller graph for this function:| void Profiler::avg | ( | const std::string & | name, |
| float | value ) |
References m_data, and m_mutex.
Referenced by ScopeProfiler::~ScopeProfiler(), ModApiBase::l_deprecated_function(), ClientMap::renderMap(), ClientMap::renderMapShadows(), ClientMap::reportMetrics(), client::ActiveObjectMgr::step(), ClientEnvironment::step(), server::ActiveObjectMgr::step(), ServerEnvironment::step(), ParticleManager::stepBuffers(), ClientMap::touchMapBlocks(), transformBuffersToDrawOrder(), ClientMap::updateDrawList(), ClientMap::updateDrawListShadow(), Game::updateFrame(), Game::updateProfilers(), ClientMap::updateTransparentMeshBuffers(), and Server::yieldToOtherThreads().
Here is the caller graph for this function:| void Profiler::clear | ( | ) |
References porting::getTimeMs(), m_data, m_mutex, and m_start_time.
Referenced by dedicated_server_loop(), ClientLauncher::run(), and Game::updateProfilers().
Here is the call graph for this function:
Here is the caller graph for this function:| int Profiler::getAvgCount | ( | const std::string & | name | ) | const |
| u64 Profiler::getElapsedMs | ( | ) | const |
References porting::getTimeMs(), and m_start_time.
Referenced by GameUI::updateProfiler().
Here is the call graph for this function:
Here is the caller graph for this function:| void Profiler::getPage | ( | GraphValues & | o, |
| u32 | page, | ||
| u32 | pagecount ) |
| float Profiler::getValue | ( | const std::string & | name | ) | const |
References m_data.
|
inline |
References m_graphvalues, and m_mutex.
Referenced by ScopeProfiler::~ScopeProfiler(), Game::drawScene(), Client::ProcessData(), con::Peer::RTTStatistics(), con::ConnectionSendThread::runTimeouts(), Client::step(), and Game::updateProfilers().
Here is the caller graph for this function:
|
inline |
References m_graphvalues, and m_mutex.
Referenced by Game::run(), and Game::updateProfilerGraphs().
Here is the caller graph for this function:
|
inline |
References m_graphvalues, and m_mutex.
Referenced by Game::updateProfilers().
Here is the caller graph for this function:| void Profiler::max | ( | const std::string & | name, |
| float | value ) |
References m_data, m_mutex, and SPT_MAX.
Referenced by ScopeProfiler::~ScopeProfiler().
Here is the caller graph for this function:| int Profiler::print | ( | std::ostream & | o, |
| u32 | page = 1, | ||
| u32 | pagecount = 1 ) |
References getAvgCount(), getPage(), and porting::mt_snprintf().
Referenced by Server::AsyncRunStep(), dedicated_server_loop(), ClientLauncher::run(), ServerMap::save(), Map::timerUpdate(), GameUI::updateProfiler(), and Game::updateProfilers().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
References m_data, and m_mutex.
Referenced by con::Peer::Drop(), con::ConnectionReceiveThread::run(), and con::ConnectionSendThread::run().
Here is the caller graph for this function:
|
private |
Referenced by add(), avg(), clear(), getAvgCount(), getPage(), getValue(), max(), and remove().
|
private |
Referenced by graphAdd(), graphPop(), and graphSet().
|
private |
Referenced by add(), avg(), clear(), getPage(), graphAdd(), graphPop(), graphSet(), max(), and remove().
|
private |
Referenced by Profiler(), clear(), and getElapsedMs().