summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
authorRichard Linden <none@none>2012-11-01 17:52:11 -0700
committerRichard Linden <none@none>2012-11-01 17:52:11 -0700
commit74fe126590fba03752d1d8d88dd3bb59c6900026 (patch)
tree8ce225ede4db348ce7ae1a576da4ed98da54a40a /indra/llui
parent3ccbce90e37b92d5b32a2507804adc91bc58065d (diff)
SH-3405 FIX convert existing stats to lltrace system
output of floater_stats is now identical to pre-lltrace system (with some tweaks)
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llstatbar.cpp6
-rw-r--r--indra/llui/llstatbar.h5
2 files changed, 10 insertions, 1 deletions
diff --git a/indra/llui/llstatbar.cpp b/indra/llui/llstatbar.cpp
index 6b40f8d475..1bc9a9fc67 100644
--- a/indra/llui/llstatbar.cpp
+++ b/indra/llui/llstatbar.cpp
@@ -53,6 +53,7 @@ LLStatBar::LLStatBar(const Params& p)
mLabelSpacing(p.label_spacing),
mPrecision(p.precision),
mUpdatesPerSec(p.update_rate),
+ mUnitScale(p.unit_scale),
mPerSec(p.show_per_sec),
mDisplayBar(p.show_bar),
mDisplayHistory(p.show_history),
@@ -148,6 +149,11 @@ void LLStatBar::draw()
mean = recording.getMean(*mMeasurementIntp);
}
+ current *= mUnitScale;
+ min *= mUnitScale;
+ max *= mUnitScale;
+ mean *= mUnitScale;
+
if ((mUpdatesPerSec == 0.f) || (mUpdateTimer.getElapsedTimeF32() > 1.f/mUpdatesPerSec) || (mValue == 0.f))
{
if (mDisplayMean)
diff --git a/indra/llui/llstatbar.h b/indra/llui/llstatbar.h
index 6aefb1e213..083da8444e 100644
--- a/indra/llui/llstatbar.h
+++ b/indra/llui/llstatbar.h
@@ -44,7 +44,8 @@ public:
bar_max,
tick_spacing,
label_spacing,
- update_rate;
+ update_rate,
+ unit_scale;
Optional<U32> precision;
@@ -64,6 +65,7 @@ public:
label_spacing("label_spacing", 10.0f),
precision("precision", 0),
update_rate("update_rate", 5.0f),
+ unit_scale("unit_scale", 1.f),
show_per_sec("show_per_sec", true),
show_bar("show_bar", TRUE),
show_history("show_history", false),
@@ -92,6 +94,7 @@ private:
F32 mLabelSpacing;
U32 mPrecision;
F32 mUpdatesPerSec;
+ F32 mUnitScale;
BOOL mPerSec; // Use the per sec stats.
BOOL mDisplayBar; // Display the bar graph.
BOOL mDisplayHistory;