X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fdebug%2Fprofiler.h;fp=source%2Fdebug%2Fprofiler.h;h=5018c7f2d654100b7a0de87901d1c0708f114eeb;hp=521ce959c5de7cae234c04ae8de5861ac3f6b42e;hb=122846f0881673770d88eff7d925ecf25c01b62e;hpb=b116e161e377da0e4e52f07745ecb2d22f962ae9 diff --git a/source/debug/profiler.h b/source/debug/profiler.h index 521ce95..5018c7f 100644 --- a/source/debug/profiler.h +++ b/source/debug/profiler.h @@ -37,27 +37,23 @@ public: struct ScopeInfo { Time::TimeStamp first_call; - unsigned calls; + unsigned calls = 0; Time::TimeDelta total_time; Time::TimeDelta self_time; Time::TimeDelta avg_time; - float calls_per_sec; + float calls_per_sec = 0; std::vector history; - unsigned hist_pos; - bool hist_full; + unsigned hist_pos = 0; + bool hist_full = false; std::map called_from; - - ScopeInfo(); }; private: - unsigned period; + unsigned period = 0; std::map scopes; - ProfilingScope *inner; + ProfilingScope *inner = 0; public: - Profiler(); - /** Sets the averaging period for timing data, measured in calls. Previous average timings are cleared. */ void set_period(unsigned p);