X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fdebug%2Fprofiler.h;h=22d2c9a82c9fcb7df8545d16e7545d9ebb0720a3;hp=521ce959c5de7cae234c04ae8de5861ac3f6b42e;hb=41363aed34382386f915f17c1a961750b4fdcb14;hpb=c3e242c2629cbc9645258b30aaf07b7285d4372b diff --git a/source/debug/profiler.h b/source/debug/profiler.h index 521ce95..22d2c9a 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 = nullptr; public: - Profiler(); - /** Sets the averaging period for timing data, measured in calls. Previous average timings are cleared. */ void set_period(unsigned p);