mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 13:06:59 -04:00
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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user