Added a panel showing profiler timings

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1523 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2010-10-13 21:35:30 +00:00
parent 7bcb045668
commit 9735e24517
8 changed files with 230 additions and 10 deletions
+2 -1
View File
@@ -53,7 +53,7 @@ void FunctionProfile::get_children(vector<FunctionProfileP>& out) const {
sort(out.begin(), out.end(), compare_time);
}
// note: not thread safe
FunctionProfile profile_aggr(_("everywhere"));
void profile_aggregate(FunctionProfile& parent, int level, int max_level, const FunctionProfile& p);
@@ -135,6 +135,7 @@ Profiler::~Profiler() {
ProfileTime time = timer.time();
if (function == parent) return; // don't count
function->time_ticks += time;
function->time_ticks_max = max(function->time_ticks_max,time);
function->calls += 1;
function = parent; // pop
}