From 18aedf0241ba893e12140c0a3855f328d2b4eded Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 17 Oct 2013 19:18:53 -0700 Subject: fix for assert at runtime (reading stats from recording while it was active) fix for bad values returns from getPeriodMin and getPeriodMax on count stats when no counts recorded fix for gcc compile time error (typename ftw) --- indra/newview/llviewerstats.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp index b5aa052a90..d5ae2d1030 100755 --- a/indra/newview/llviewerstats.cpp +++ b/indra/newview/llviewerstats.cpp @@ -208,7 +208,7 @@ LLTrace::EventStatHandle > OBJECT_CACHE_HIT_RATE(" LLViewerStats::LLViewerStats() : mLastTimeDiff(0.0) { - mRecording.start(); + getRecording().start(); } LLViewerStats::~LLViewerStats() @@ -216,7 +216,7 @@ LLViewerStats::~LLViewerStats() void LLViewerStats::resetStats() { - LLViewerStats::instance().mRecording.reset(); + getRecording().reset(); } void LLViewerStats::updateFrameStats(const F64Seconds time_diff) @@ -457,6 +457,8 @@ void send_stats() return; } + LLViewerStats::instance().getRecording().pause(); + body["session_id"] = gAgentSessionID; LLSD &agent = body["agent"]; @@ -616,6 +618,8 @@ void send_stats() LLViewerStats::getInstance()->addToMessage(body); LLHTTPClient::post(url, body, new ViewerStatsResponder()); + + LLViewerStats::instance().getRecording().resume(); } LLFrameTimer& LLViewerStats::PhaseMap::getPhaseTimer(const std::string& phase_name) -- cgit v1.2.3