From 17df8988fec3f2ba991ca9e34ff8148253a2fc04 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Mon, 7 Oct 2013 13:38:03 -0700 Subject: renamed TraceType to StatType added more MemTrackable types optimized memory usage of LLTrace some more --- indra/llui/llstatbar.cpp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'indra/llui/llstatbar.cpp') diff --git a/indra/llui/llstatbar.cpp b/indra/llui/llstatbar.cpp index bc8235132e..24256c3193 100755 --- a/indra/llui/llstatbar.cpp +++ b/indra/llui/llstatbar.cpp @@ -284,7 +284,7 @@ S32 calc_num_rapid_changes(LLTrace::PeriodicRecording& periodic_recording, const return num_rapid_changes; } -S32 calc_num_rapid_changes(LLTrace::PeriodicRecording& periodic_recording, const LLTrace::TraceType& stat, const F32Seconds time_period) +S32 calc_num_rapid_changes(LLTrace::PeriodicRecording& periodic_recording, const LLTrace::StatType& stat, const F32Seconds time_period) { F32Seconds elapsed_time, time_since_value_changed; @@ -332,7 +332,7 @@ void LLStatBar::draw() { case STAT_COUNT: { - const LLTrace::TraceType& count_stat = *mStat.countStatp; + const LLTrace::StatType& count_stat = *mStat.countStatp; unit_label = std::string(count_stat.getUnitLabel()) + "/s"; current = last_frame_recording.getPerSec(count_stat); @@ -344,7 +344,7 @@ void LLStatBar::draw() break; case STAT_EVENT: { - const LLTrace::TraceType& event_stat = *mStat.eventStatp; + const LLTrace::StatType& event_stat = *mStat.eventStatp; unit_label = mUnitLabel.empty() ? event_stat.getUnitLabel() : mUnitLabel; current = last_frame_recording.getLastValue(event_stat); @@ -356,7 +356,7 @@ void LLStatBar::draw() break; case STAT_SAMPLE: { - const LLTrace::TraceType& sample_stat = *mStat.sampleStatp; + const LLTrace::StatType& sample_stat = *mStat.sampleStatp; unit_label = mUnitLabel.empty() ? sample_stat.getUnitLabel() : mUnitLabel; current = last_frame_recording.getLastValue(sample_stat); @@ -379,7 +379,7 @@ void LLStatBar::draw() break; case STAT_MEM: { - const LLTrace::TraceType& mem_stat = *mStat.memStatp; + const LLTrace::StatType& mem_stat = *mStat.memStatp; unit_label = mUnitLabel.empty() ? mem_stat.getUnitLabel() : mUnitLabel; current = last_frame_recording.getLastValue(mem_stat).value(); @@ -578,27 +578,27 @@ void LLStatBar::draw() void LLStatBar::setStat(const std::string& stat_name) { using namespace LLTrace; - const TraceType* count_stat; - const TraceType* event_stat; - const TraceType* sample_stat; - const TraceType* mem_stat; + const StatType* count_stat; + const StatType* event_stat; + const StatType* sample_stat; + const StatType* mem_stat; - if ((count_stat = TraceType::getInstance(stat_name))) + if ((count_stat = StatType::getInstance(stat_name))) { mStat.countStatp = count_stat; mStatType = STAT_COUNT; } - else if ((event_stat = TraceType::getInstance(stat_name))) + else if ((event_stat = StatType::getInstance(stat_name))) { mStat.eventStatp = event_stat; mStatType = STAT_EVENT; } - else if ((sample_stat = TraceType::getInstance(stat_name))) + else if ((sample_stat = StatType::getInstance(stat_name))) { mStat.sampleStatp = sample_stat; mStatType = STAT_SAMPLE; } - else if ((mem_stat = TraceType::getInstance(stat_name))) + else if ((mem_stat = StatType::getInstance(stat_name))) { mStat.memStatp = mem_stat; mStatType = STAT_MEM; -- cgit v1.2.3