From 0c3d39357b7006844f5e86baf21704d3fa8a7be7 Mon Sep 17 00:00:00 2001 From: Kahrl Date: Wed, 1 Feb 2012 00:56:30 +0100 Subject: F1 toggles HUD, F2 toggles chat, F5 toggles debug info, F6 toggles profiler pages --- src/profiler.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/profiler.h') diff --git a/src/profiler.h b/src/profiler.h index 129118ef6..7bb3b3750 100644 --- a/src/profiler.h +++ b/src/profiler.h @@ -99,12 +99,31 @@ public: } void print(std::ostream &o) + { + printPage(o, 1, 1); + } + + void printPage(std::ostream &o, u32 page, u32 pagecount) { JMutexAutoLock lock(m_mutex); + + u32 minindex, maxindex; + paging(m_data.size(), page, pagecount, minindex, maxindex); + for(core::map::Iterator i = m_data.getIterator(); i.atEnd() == false; i++) { + if(maxindex == 0) + break; + maxindex--; + + if(minindex != 0) + { + minindex--; + continue; + } + std::string name = i.getNode()->getKey(); int avgcount = 1; core::map::Node *n = m_avgcounts.find(name); -- cgit v1.2.3