X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fdebug%2Fprofiler.h;h=ad0653c0697f566b31f356974733293277d6e63b;hp=5ec8f3f1fcafa5dae8ebe4508a5b02abaeb7e1f3;hb=4798e6e5eac917b6225a1295fa5b118d88345237;hpb=27efc167cb10ee03c1d2a6711dd149d1093179c8 diff --git a/source/debug/profiler.h b/source/debug/profiler.h index 5ec8f3f..ad0653c 100644 --- a/source/debug/profiler.h +++ b/source/debug/profiler.h @@ -5,6 +5,7 @@ #include #include #include +#include namespace Msp { namespace Debug { @@ -25,14 +26,23 @@ Profiler for each thread. class Profiler { public: + struct CallInfo + { + Msp::Time::TimeStamp entry_time; + Msp::Time::TimeDelta duration; + }; + struct ScopeInfo { + Time::TimeStamp first_call; unsigned calls; Time::TimeDelta total_time; Time::TimeDelta self_time; Time::TimeDelta avg_time; - std::vector history; + float calls_per_sec; + std::vector history; unsigned hist_pos; + bool hist_full; std::map called_from; ScopeInfo();