From 13e4edf1cd664864afa585bc83bbe99d4f743326 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Sun, 2 Dec 2012 23:00:36 -0800 Subject: SH-3406 WIP convert fast timers to lltrace system started moving fast timer historical stats over to LLTrace periodic recording --- indra/newview/llfasttimerview.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp index 7a5c9dba46..6aca8f4426 100644 --- a/indra/newview/llfasttimerview.cpp +++ b/indra/newview/llfasttimerview.cpp @@ -294,15 +294,17 @@ static std::string get_tooltip(LLTrace::BlockTimer& timer, S32 history_index = - { F64 ms_multiplier = 1000.0 / (F64)LLTrace::BlockTimer::countsPerSecond(); + LLTrace::PeriodicRecording& frame_stats = LLTrace::get_frame_recording(); + std::string tooltip; if (history_index < 0) { // by default, show average number of call - tooltip = llformat("%s (%d ms, %d calls)", timer.getName().c_str(), (S32)(timer.getCountAverage() * ms_multiplier), (S32)timer.getCallAverage()); + tooltip = llformat("%s (%d ms, %d calls)", timer.getName().c_str(), (S32)(frame_stats.getPeriodMean(timer) * ms_multiplier), (S32)timer.getCallAverage()); } else { - tooltip = llformat("%s (%d ms, %d calls)", timer.getName().c_str(), (S32)(timer.getHistoricalCount(history_index) * ms_multiplier), (S32)timer.getHistoricalCalls(history_index)); + tooltip = llformat("%s (%d ms, %d calls)", timer.getName().c_str(), (S32)(frame_stats.getPrevRecordingPeriod(history_index).getSum(timer) * ms_multiplier), (S32)timer.getHistoricalCalls(history_index)); } return tooltip; } -- cgit v1.2.3