From b3e9c46c94dad0c81a5adcb9152521b5368c66a7 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 29 Aug 2012 22:50:56 -0700 Subject: SH-3275 WIP Run viewer metrics for object update messages further cleanup of LLStat removed llfloaterlagmeter --- indra/llui/llstatbar.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/llui/llstatbar.h') diff --git a/indra/llui/llstatbar.h b/indra/llui/llstatbar.h index 513fff3234..7e636d0aa7 100644 --- a/indra/llui/llstatbar.h +++ b/indra/llui/llstatbar.h @@ -59,10 +59,10 @@ public: label_spacing("label_spacing", 10.0f), precision("precision", 0), update_rate("update_rate", 5.0f), - show_per_sec("show_per_sec", TRUE), + show_per_sec("show_per_sec", true), show_bar("show_bar", TRUE), - show_history("show_history", FALSE), - show_mean("show_mean", TRUE), + show_history("show_history", false), + show_mean("show_mean", true), stat("stat") { changeDefault(follows.flags, FOLLOWS_TOP | FOLLOWS_LEFT); -- cgit v1.2.3 From b1baf982b1bd41a150233d0a28d3601226924c65 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Sun, 30 Sep 2012 10:41:29 -0700 Subject: SH-3275 WIP Run viewer metrics for object update messages factored out lltrace::sampler into separate file added rudimentary lltrace support to llstatgraph made llstatgraph use param blocks more effectively moves initial set of stats over to lltrace removed windows.h #defines for min and max --- indra/llui/llstatbar.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/llui/llstatbar.h') diff --git a/indra/llui/llstatbar.h b/indra/llui/llstatbar.h index 7e636d0aa7..8348290abf 100644 --- a/indra/llui/llstatbar.h +++ b/indra/llui/llstatbar.h @@ -29,6 +29,7 @@ #include "llview.h" #include "llframetimer.h" +#include "lltrace.h" class LLStat; @@ -92,6 +93,8 @@ private: BOOL mDisplayMean; // If true, display mean, if false, display current value LLStat* mStatp; + LLTrace::Stat* mFloatStatp; + LLTrace::Stat* mIntStatp; LLFrameTimer mUpdateTimer; LLUIString mLabel; -- cgit v1.2.3 From 14b1b0b2bb6bac5bc688cc4d14c33f1b680dd3b4 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Mon, 1 Oct 2012 19:39:04 -0700 Subject: SH-3275 WIP Run viewer metrics for object update messages cleaned up API samplers are now value types with copy-on-write buffers under the hood removed coupling with LLThread --- indra/llui/llstatbar.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/llui/llstatbar.h') diff --git a/indra/llui/llstatbar.h b/indra/llui/llstatbar.h index 8348290abf..c735e7045b 100644 --- a/indra/llui/llstatbar.h +++ b/indra/llui/llstatbar.h @@ -36,6 +36,7 @@ class LLStat; class LLStatBar : public LLView { public: + struct Params : public LLInitParam::Block { Optional label; @@ -93,8 +94,7 @@ private: BOOL mDisplayMean; // If true, display mean, if false, display current value LLStat* mStatp; - LLTrace::Stat* mFloatStatp; - LLTrace::Stat* mIntStatp; + LLTrace::Rate* mFloatStatp; LLFrameTimer mUpdateTimer; LLUIString mLabel; -- cgit v1.2.3 From 0f58ca02cdec62711eadb82ba28fcff08faef2ee Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Fri, 12 Oct 2012 00:20:19 -0700 Subject: SH-3275 WIP Update viewer metrics system to be more flexible cleaned up accumulator merging logic introduced frame recording to LLTrace directly instead of going through LLViewerStats moved consumer code over to frame recording instead of whatever the current active recording was --- indra/llui/llstatbar.h | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) (limited to 'indra/llui/llstatbar.h') diff --git a/indra/llui/llstatbar.h b/indra/llui/llstatbar.h index c735e7045b..bfc49b9204 100644 --- a/indra/llui/llstatbar.h +++ b/indra/llui/llstatbar.h @@ -29,8 +29,7 @@ #include "llview.h" #include "llframetimer.h" -#include "lltrace.h" - +#include "lltracerecording.h" class LLStat; class LLStatBar : public LLView @@ -39,19 +38,24 @@ public: struct Params : public LLInitParam::Block { - Optional label; - Optional unit_label; - Optional bar_min; - Optional bar_max; - Optional tick_spacing; - Optional label_spacing; - Optional precision; - Optional update_rate; - Optional show_per_sec; - Optional show_bar; - Optional show_history; - Optional show_mean; - Optional stat; + Optional label, + unit_label; + + Optional bar_min, + bar_max, + tick_spacing, + label_spacing, + update_rate; + + Optional precision; + + Optional show_per_sec, + show_bar, + show_history, + show_mean; + + Optional stat; + Params() : label("label"), unit_label("unit_label"), @@ -92,6 +96,7 @@ private: BOOL mDisplayBar; // Display the bar graph. BOOL mDisplayHistory; BOOL mDisplayMean; // If true, display mean, if false, display current value + LLTrace::PeriodicRecording* mFrameRecording; LLStat* mStatp; LLTrace::Rate* mFloatStatp; -- cgit v1.2.3 From 041dfccd1ea5b59c1b3c4e37e9a5495cad342c8f Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Fri, 12 Oct 2012 20:17:52 -0700 Subject: SH-3405 WIP convert existing stats to lltrace system default to double precision now fixed unit conversion logic for LLUnit renamed LLTrace::Rate to LLTrace::Count and got rid of the old count as it was confusing some const correctness changes --- indra/llui/llstatbar.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llui/llstatbar.h') diff --git a/indra/llui/llstatbar.h b/indra/llui/llstatbar.h index bfc49b9204..e4b0c61c42 100644 --- a/indra/llui/llstatbar.h +++ b/indra/llui/llstatbar.h @@ -99,7 +99,7 @@ private: LLTrace::PeriodicRecording* mFrameRecording; LLStat* mStatp; - LLTrace::Rate* mFloatStatp; + LLTrace::Count<>* mNewStatp; LLFrameTimer mUpdateTimer; LLUIString mLabel; -- cgit v1.2.3 From a52d203a4f1d2988e8ffba16258f3f132f22f56d Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 17 Oct 2012 20:00:07 -0700 Subject: SH-3405 WIP convert existing stats to lltrace system started conversion of llviewerassetstats removed old, dead LLViewerStats code made units tracing require units declaration clean up of units handling --- indra/llui/llstatbar.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llui/llstatbar.h') diff --git a/indra/llui/llstatbar.h b/indra/llui/llstatbar.h index e4b0c61c42..d510f0e3fe 100644 --- a/indra/llui/llstatbar.h +++ b/indra/llui/llstatbar.h @@ -99,7 +99,7 @@ private: LLTrace::PeriodicRecording* mFrameRecording; LLStat* mStatp; - LLTrace::Count<>* mNewStatp; + LLTrace::count_common_t* mNewStatp; LLFrameTimer mUpdateTimer; LLUIString mLabel; -- cgit v1.2.3 From 819adb5eb4d7f982121f3dbd82750e05d26864d9 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 1 Nov 2012 00:26:44 -0700 Subject: SH-3405 FIX convert existing stats to lltrace system final removal of remaining LLStat code --- indra/llui/llstatbar.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'indra/llui/llstatbar.h') diff --git a/indra/llui/llstatbar.h b/indra/llui/llstatbar.h index d510f0e3fe..6aefb1e213 100644 --- a/indra/llui/llstatbar.h +++ b/indra/llui/llstatbar.h @@ -30,7 +30,6 @@ #include "llview.h" #include "llframetimer.h" #include "lltracerecording.h" -class LLStat; class LLStatBar : public LLView { @@ -79,7 +78,8 @@ public: virtual void draw(); virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask); - void setStat(LLStat* stat) { mStatp = stat; } + void setStat(const std::string& stat_name); + void setRange(F32 bar_min, F32 bar_max, F32 tick_spacing, F32 label_spacing); void getRange(F32& bar_min, F32& bar_max) { bar_min = mMinBar; bar_max = mMaxBar; } @@ -96,10 +96,11 @@ private: BOOL mDisplayBar; // Display the bar graph. BOOL mDisplayHistory; BOOL mDisplayMean; // If true, display mean, if false, display current value - LLTrace::PeriodicRecording* mFrameRecording; - LLStat* mStatp; - LLTrace::count_common_t* mNewStatp; + LLTrace::count_common_float_t* mCountFloatp; + LLTrace::count_common_int_t* mCountIntp; + LLTrace::measurement_common_float_t* mMeasurementFloatp; + LLTrace::measurement_common_int_t* mMeasurementIntp; LLFrameTimer mUpdateTimer; LLUIString mLabel; -- cgit v1.2.3 From 74fe126590fba03752d1d8d88dd3bb59c6900026 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 1 Nov 2012 17:52:11 -0700 Subject: SH-3405 FIX convert existing stats to lltrace system output of floater_stats is now identical to pre-lltrace system (with some tweaks) --- indra/llui/llstatbar.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'indra/llui/llstatbar.h') 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 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; -- cgit v1.2.3 From 67ec47e6da389661934ed2ddfa55ca58455fa7e5 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 13 Nov 2012 17:10:10 -0800 Subject: SH-3406 WIP convert fast timers to lltrace system moving fast timers into lltrace namespace and accumulation system --- indra/llui/llstatbar.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/llui/llstatbar.h') diff --git a/indra/llui/llstatbar.h b/indra/llui/llstatbar.h index 083da8444e..17c9c09cb2 100644 --- a/indra/llui/llstatbar.h +++ b/indra/llui/llstatbar.h @@ -100,10 +100,10 @@ private: BOOL mDisplayHistory; BOOL mDisplayMean; // If true, display mean, if false, display current value - LLTrace::count_common_float_t* mCountFloatp; - LLTrace::count_common_int_t* mCountIntp; - LLTrace::measurement_common_float_t* mMeasurementFloatp; - LLTrace::measurement_common_int_t* mMeasurementIntp; + LLTrace::TraceType >* mCountFloatp; + LLTrace::TraceType >* mCountIntp; + LLTrace::TraceType >* mMeasurementFloatp; + LLTrace::TraceType >* mMeasurementIntp; LLFrameTimer mUpdateTimer; LLUIString mLabel; -- cgit v1.2.3 From 9d77e030d9a0d23cebce616631677459eec1612c Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 14 Nov 2012 23:52:27 -0800 Subject: SH-3406 WIP convert fast timers to lltrace system cleaning up build moved most includes of windows.h to llwin32headers.h to disable min/max macros, etc streamlined Time class and consolidated functionality in BlockTimer class llfasttimer is no longer included via llstring.h, so had to add it manually in several places --- indra/llui/llstatbar.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/llui/llstatbar.h') diff --git a/indra/llui/llstatbar.h b/indra/llui/llstatbar.h index 17c9c09cb2..c366fd65db 100644 --- a/indra/llui/llstatbar.h +++ b/indra/llui/llstatbar.h @@ -100,10 +100,10 @@ private: BOOL mDisplayHistory; BOOL mDisplayMean; // If true, display mean, if false, display current value - LLTrace::TraceType >* mCountFloatp; - LLTrace::TraceType >* mCountIntp; - LLTrace::TraceType >* mMeasurementFloatp; - LLTrace::TraceType >* mMeasurementIntp; + LLTrace::TraceType >* mCountFloatp; + LLTrace::TraceType >* mCountIntp; + LLTrace::TraceType >* mMeasurementFloatp; + LLTrace::TraceType >* mMeasurementIntp; LLFrameTimer mUpdateTimer; LLUIString mLabel; -- cgit v1.2.3 From 7b4d27ecbcb5ac702459be97cbf6b81354850658 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 14 Mar 2013 19:36:50 -0700 Subject: SH-3931 WIP Interesting: Add graphs to visualize scene load metrics collapsed Orientation enums to all use LLView::EOrientation added ability to display stat bar horizontally --- indra/llui/llstatbar.h | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) (limited to 'indra/llui/llstatbar.h') diff --git a/indra/llui/llstatbar.h b/indra/llui/llstatbar.h index c366fd65db..0ec8aaeaa9 100644 --- a/indra/llui/llstatbar.h +++ b/indra/llui/llstatbar.h @@ -55,6 +55,7 @@ public: show_mean; Optional stat; + Optional orientation; Params() : label("label"), @@ -70,7 +71,8 @@ public: show_bar("show_bar", TRUE), show_history("show_history", false), show_mean("show_mean", true), - stat("stat") + stat("stat"), + orientation("orientation", VERTICAL) { changeDefault(follows.flags, FOLLOWS_TOP | FOLLOWS_LEFT); } @@ -88,27 +90,28 @@ public: /*virtual*/ LLRect getRequiredRect(); // Return the height of this object, given the set options. private: - F32 mMinBar; - F32 mMaxBar; - F32 mTickSpacing; - F32 mLabelSpacing; - U32 mPrecision; - F32 mUpdatesPerSec; - F32 mUnitScale; - BOOL mPerSec; // Use the per sec stats. - BOOL mDisplayBar; // Display the bar graph. - BOOL mDisplayHistory; - BOOL mDisplayMean; // If true, display mean, if false, display current value - - LLTrace::TraceType >* mCountFloatp; - LLTrace::TraceType >* mCountIntp; + F32 mMinBar; + F32 mMaxBar; + F32 mTickSpacing; + F32 mLabelSpacing; + U32 mPrecision; + F32 mUpdatesPerSec; + F32 mUnitScale; + bool mPerSec; // Use the per sec stats. + bool mDisplayBar; // Display the bar graph. + bool mDisplayHistory; + bool mDisplayMean; // If true, display mean, if false, display current value + EOrientation mOrientation; + + LLTrace::TraceType >* mCountFloatp; + LLTrace::TraceType >* mCountIntp; LLTrace::TraceType >* mMeasurementFloatp; LLTrace::TraceType >* mMeasurementIntp; LLFrameTimer mUpdateTimer; - LLUIString mLabel; - std::string mUnitLabel; - F32 mValue; + LLUIString mLabel; + std::string mUnitLabel; + F32 mValue; }; #endif -- cgit v1.2.3 From 8de397b19ec9e2f6206fd5ae57dba96c70e78b74 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Mon, 18 Mar 2013 08:43:03 -0700 Subject: SH-3931 WIP Interesting: Add graphs to visualize scene load metrics changed LLCriticalDamp to LLSmoothInterpolation and sped up interpolator lookup improvements to stats display of llstatbar added scene load stats floater accessed with ctrl|shift|2 --- indra/llui/llstatbar.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'indra/llui/llstatbar.h') diff --git a/indra/llui/llstatbar.h b/indra/llui/llstatbar.h index 0ec8aaeaa9..a83ccbe9e5 100644 --- a/indra/llui/llstatbar.h +++ b/indra/llui/llstatbar.h @@ -52,8 +52,11 @@ public: Optional show_per_sec, show_bar, show_history, - show_mean; + show_mean, + scale_range; + Optional num_frames, + max_height; Optional stat; Optional orientation; @@ -71,6 +74,9 @@ public: show_bar("show_bar", TRUE), show_history("show_history", false), show_mean("show_mean", true), + scale_range("scale_range", true), + num_frames("num_frames", 300), + max_height("max_height", 200), stat("stat"), orientation("orientation", VERTICAL) { @@ -92,15 +98,19 @@ public: private: F32 mMinBar; F32 mMaxBar; + F32 mCurMaxBar; F32 mTickSpacing; F32 mLabelSpacing; U32 mPrecision; F32 mUpdatesPerSec; F32 mUnitScale; + S32 mNumFrames; + S32 mMaxHeight; bool mPerSec; // Use the per sec stats. bool mDisplayBar; // Display the bar graph. bool mDisplayHistory; bool mDisplayMean; // If true, display mean, if false, display current value + bool mScaleRange; EOrientation mOrientation; LLTrace::TraceType >* mCountFloatp; -- cgit v1.2.3 From 1f507c3cfca0c7722ebeaf71883fbaa83988e1a9 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 21 Mar 2013 00:37:20 -0700 Subject: SH-3931 WIP Interesting: Add graphs to visualize scene load metrics copied over scene load frame differencing changes from viewer-interesting made periodicrecording flexible enough to allow for indefinite number of periods added scene loading stats floater fixed collapsing behavior of container views --- indra/llui/llstatbar.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llui/llstatbar.h') diff --git a/indra/llui/llstatbar.h b/indra/llui/llstatbar.h index a83ccbe9e5..74a3ebde2f 100644 --- a/indra/llui/llstatbar.h +++ b/indra/llui/llstatbar.h @@ -71,7 +71,7 @@ public: 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_bar("show_bar", true), show_history("show_history", false), show_mean("show_mean", true), scale_range("scale_range", true), -- cgit v1.2.3 From 935dce7d6b0a343cef5b13f53d6da5d0c2dc6a73 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Mon, 25 Mar 2013 00:18:06 -0700 Subject: SH-3931 WIP Interesting: Add graphs to visualize scene load metrics fixed some compile errors made label spacing automatic on stat bars fixed infinite values coming from stats --- indra/llui/llstatbar.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'indra/llui/llstatbar.h') diff --git a/indra/llui/llstatbar.h b/indra/llui/llstatbar.h index 74a3ebde2f..db667aa07d 100644 --- a/indra/llui/llstatbar.h +++ b/indra/llui/llstatbar.h @@ -43,7 +43,6 @@ public: Optional bar_min, bar_max, tick_spacing, - label_spacing, update_rate, unit_scale; @@ -66,7 +65,6 @@ public: bar_min("bar_min", 0.0f), bar_max("bar_max", 50.0f), tick_spacing("tick_spacing", 10.0f), - label_spacing("label_spacing", 10.0f), precision("precision", 0), update_rate("update_rate", 5.0f), unit_scale("unit_scale", 1.f), @@ -90,7 +88,7 @@ public: void setStat(const std::string& stat_name); - void setRange(F32 bar_min, F32 bar_max, F32 tick_spacing, F32 label_spacing); + void setRange(F32 bar_min, F32 bar_max, F32 tick_spacing); void getRange(F32& bar_min, F32& bar_max) { bar_min = mMinBar; bar_max = mMaxBar; } /*virtual*/ LLRect getRequiredRect(); // Return the height of this object, given the set options. -- cgit v1.2.3 From 9ae76d12157641033431381959ef4f798a119b8d Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 29 May 2013 17:00:50 -0700 Subject: SH-3931 WIP Interesting: Add graphs to visualize scene load metrics fixed copy construction behavior of Recordings to not zero out data split measurement into event and sample, with sample representing a continuous function --- indra/llui/llstatbar.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'indra/llui/llstatbar.h') diff --git a/indra/llui/llstatbar.h b/indra/llui/llstatbar.h index db667aa07d..a0ed9699aa 100644 --- a/indra/llui/llstatbar.h +++ b/indra/llui/llstatbar.h @@ -111,10 +111,12 @@ private: bool mScaleRange; EOrientation mOrientation; - LLTrace::TraceType >* mCountFloatp; - LLTrace::TraceType >* mCountIntp; - LLTrace::TraceType >* mMeasurementFloatp; - LLTrace::TraceType >* mMeasurementIntp; + LLTrace::TraceType >* mCountFloatp; + LLTrace::TraceType >* mCountIntp; + LLTrace::TraceType >* mEventFloatp; + LLTrace::TraceType >* mEventIntp; + LLTrace::TraceType >* mSampleFloatp; + LLTrace::TraceType >* mSampleIntp; LLFrameTimer mUpdateTimer; LLUIString mLabel; -- cgit v1.2.3 From 233201f8227f92e93061d3e2393a17b42dfa3dd1 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Sun, 2 Jun 2013 22:49:17 -0700 Subject: SH-3931 WIP Interesting: Add graphs to visualize scene load metrics removed unnecessary templates from accumulator types...now always track data in double precision floating point, using templated accessors to convert to and from arbitrary types --- indra/llui/llstatbar.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'indra/llui/llstatbar.h') diff --git a/indra/llui/llstatbar.h b/indra/llui/llstatbar.h index a0ed9699aa..3daec297bb 100644 --- a/indra/llui/llstatbar.h +++ b/indra/llui/llstatbar.h @@ -111,12 +111,9 @@ private: bool mScaleRange; EOrientation mOrientation; - LLTrace::TraceType >* mCountFloatp; - LLTrace::TraceType >* mCountIntp; - LLTrace::TraceType >* mEventFloatp; - LLTrace::TraceType >* mEventIntp; - LLTrace::TraceType >* mSampleFloatp; - LLTrace::TraceType >* mSampleIntp; + LLTrace::TraceType* mCountFloatp; + LLTrace::TraceType* mEventFloatp; + LLTrace::TraceType* mSampleFloatp; LLFrameTimer mUpdateTimer; LLUIString mLabel; -- cgit v1.2.3 From d122318bef2ff0eced7641dc24f411f792bd2935 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Mon, 8 Jul 2013 00:55:17 -0700 Subject: SH-4299 WIP: Interesting: High fps shown temporarily off scale in statistics console added percentage/ratio units added auto-range and auto tick calculation to stat bar to automate display stats --- indra/llui/llstatbar.h | 75 +++++++++++++++++++++++--------------------------- 1 file changed, 35 insertions(+), 40 deletions(-) (limited to 'indra/llui/llstatbar.h') diff --git a/indra/llui/llstatbar.h b/indra/llui/llstatbar.h index 3daec297bb..a0299c0efb 100755 --- a/indra/llui/llstatbar.h +++ b/indra/llui/llstatbar.h @@ -42,11 +42,9 @@ public: Optional bar_min, bar_max, - tick_spacing, - update_rate, - unit_scale; + tick_spacing; - Optional precision; + Optional decimal_digits; Optional show_per_sec, show_bar, @@ -60,23 +58,21 @@ public: Optional orientation; Params() - : label("label"), - unit_label("unit_label"), - bar_min("bar_min", 0.0f), - bar_max("bar_max", 50.0f), - tick_spacing("tick_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), - show_mean("show_mean", true), - scale_range("scale_range", true), - num_frames("num_frames", 300), - max_height("max_height", 200), - stat("stat"), - orientation("orientation", VERTICAL) + : label("label"), + unit_label("unit_label"), + bar_min("bar_min", 0.0f), + bar_max("bar_max", 0.0f), + tick_spacing("tick_spacing", 10.0f), + decimal_digits("decimal_digits", 3), + show_per_sec("show_per_sec", true), + show_bar("show_bar", false), + show_history("show_history", false), + show_mean("show_mean", true), + scale_range("scale_range", true), + num_frames("num_frames", 200), + max_height("max_height", 100), + stat("stat"), + orientation("orientation", VERTICAL) { changeDefault(follows.flags, FOLLOWS_TOP | FOLLOWS_LEFT); } @@ -85,40 +81,39 @@ public: virtual void draw(); virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask); + virtual BOOL handleHover(S32 x, S32 y, MASK mask); void setStat(const std::string& stat_name); - void setRange(F32 bar_min, F32 bar_max, F32 tick_spacing); + void setRange(F32 bar_min, F32 bar_max); void getRange(F32& bar_min, F32& bar_max) { bar_min = mMinBar; bar_max = mMaxBar; } /*virtual*/ LLRect getRequiredRect(); // Return the height of this object, given the set options. private: - F32 mMinBar; - F32 mMaxBar; - F32 mCurMaxBar; - F32 mTickSpacing; - F32 mLabelSpacing; - U32 mPrecision; - F32 mUpdatesPerSec; - F32 mUnitScale; + F32 mMinBar, + mMaxBar, + mCurMaxBar, + mCurMinBar, + mLabelSpacing; + F32 mTickValue; + U32 mDecimalDigits; S32 mNumFrames; S32 mMaxHeight; - bool mPerSec; // Use the per sec stats. - bool mDisplayBar; // Display the bar graph. - bool mDisplayHistory; - bool mDisplayMean; // If true, display mean, if false, display current value - bool mScaleRange; + bool mPerSec, // Use the per sec stats. + mDisplayBar, // Display the bar graph. + mDisplayHistory, + mDisplayMean, // If true, display mean, if false, display current value + mScaleMax, + mScaleMin; EOrientation mOrientation; - LLTrace::TraceType* mCountFloatp; - LLTrace::TraceType* mEventFloatp; - LLTrace::TraceType* mSampleFloatp; + LLTrace::TraceType* mCountFloatp; + LLTrace::TraceType* mEventFloatp; + LLTrace::TraceType* mSampleFloatp; - LLFrameTimer mUpdateTimer; LLUIString mLabel; std::string mUnitLabel; - F32 mValue; }; #endif -- cgit v1.2.3 From c95042db3e8d2f1a938e7d6e9ca625700d634639 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Fri, 12 Jul 2013 00:52:31 -0700 Subject: SH-4299 WIP: Interesting: High fps shown temporarily off scale in statistics console improved calculation of display range for stat bars --- indra/llui/llstatbar.h | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'indra/llui/llstatbar.h') diff --git a/indra/llui/llstatbar.h b/indra/llui/llstatbar.h index a0299c0efb..fc925b1a74 100755 --- a/indra/llui/llstatbar.h +++ b/indra/llui/llstatbar.h @@ -49,7 +49,6 @@ public: Optional show_per_sec, show_bar, show_history, - show_mean, scale_range; Optional num_frames, @@ -60,14 +59,13 @@ public: Params() : label("label"), unit_label("unit_label"), - bar_min("bar_min", 0.0f), - bar_max("bar_max", 0.0f), - tick_spacing("tick_spacing", 10.0f), + bar_min("bar_min", 0.f), + bar_max("bar_max", 0.f), + tick_spacing("tick_spacing", 0.f), decimal_digits("decimal_digits", 3), show_per_sec("show_per_sec", true), show_bar("show_bar", false), show_history("show_history", false), - show_mean("show_mean", true), scale_range("scale_range", true), num_frames("num_frames", 200), max_height("max_height", 100), @@ -103,9 +101,8 @@ private: bool mPerSec, // Use the per sec stats. mDisplayBar, // Display the bar graph. mDisplayHistory, - mDisplayMean, // If true, display mean, if false, display current value - mScaleMax, - mScaleMin; + mAutoScaleMax, + mAutoScaleMin; EOrientation mOrientation; LLTrace::TraceType* mCountFloatp; -- cgit v1.2.3 From a2e22732f195dc075a733c79f15156752f522a43 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 30 Jul 2013 19:13:45 -0700 Subject: Summer cleaning - removed a lot of llcommon dependencies to speed up build times consolidated most indra-specific constants in llcommon under indra_constants.h fixed issues with operations on mixed unit types (implicit and explicit) made LL_INFOS() style macros variadic in order to subsume other logging methods such as ll_infos added optional tag output to error recorders --- indra/llui/llstatbar.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'indra/llui/llstatbar.h') diff --git a/indra/llui/llstatbar.h b/indra/llui/llstatbar.h index fc925b1a74..5aed98fecf 100755 --- a/indra/llui/llstatbar.h +++ b/indra/llui/llstatbar.h @@ -46,12 +46,12 @@ public: Optional decimal_digits; - Optional show_per_sec, - show_bar, + Optional show_bar, show_history, scale_range; Optional num_frames, + num_frames_short, max_height; Optional stat; Optional orientation; @@ -63,11 +63,11 @@ public: bar_max("bar_max", 0.f), tick_spacing("tick_spacing", 0.f), decimal_digits("decimal_digits", 3), - show_per_sec("show_per_sec", true), show_bar("show_bar", false), show_history("show_history", false), scale_range("scale_range", true), num_frames("num_frames", 200), + num_frames_short("num_frames_short", 20), max_height("max_height", 100), stat("stat"), orientation("orientation", VERTICAL) @@ -96,10 +96,10 @@ private: mLabelSpacing; F32 mTickValue; U32 mDecimalDigits; - S32 mNumFrames; + S32 mNumHistoryFrames, + mNumShortHistoryFrames; S32 mMaxHeight; - bool mPerSec, // Use the per sec stats. - mDisplayBar, // Display the bar graph. + bool mDisplayBar, // Display the bar graph. mDisplayHistory, mAutoScaleMax, mAutoScaleMin; -- cgit v1.2.3 From cc31b4ae7934010762b8aaaa7e190c74a1cd7820 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Mon, 12 Aug 2013 20:05:16 -0700 Subject: SH-4399 FIX: Interesting: Texture console MB Bound 0/384 and texture queue bounces once per second SH-4346 FIX: Interesting: some integer Statistics are displayed as floating point after crossing region boundary made llerrs/infos/etc properly variadic wrt tags LL_INFOS("A", "B", "C") works, for example fixed unit tests remove llsimplestat --- indra/llui/llstatbar.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'indra/llui/llstatbar.h') diff --git a/indra/llui/llstatbar.h b/indra/llui/llstatbar.h index 5aed98fecf..dd4d9400a5 100755 --- a/indra/llui/llstatbar.h +++ b/indra/llui/llstatbar.h @@ -89,6 +89,9 @@ public: /*virtual*/ LLRect getRequiredRect(); // Return the height of this object, given the set options. private: + void drawLabelAndValue( F32 mean, std::string &unit_label, LLRect &bar_rect ); + void drawTicks( F32 min, F32 max, F32 value_scale, LLRect &bar_rect ); + F32 mMinBar, mMaxBar, mCurMaxBar, @@ -104,10 +107,12 @@ private: mAutoScaleMax, mAutoScaleMin; EOrientation mOrientation; + F32 mLastDisplayValue; + LLFrameTimer mLastDisplayValueTimer; - LLTrace::TraceType* mCountFloatp; - LLTrace::TraceType* mEventFloatp; - LLTrace::TraceType* mSampleFloatp; + const LLTrace::TraceType* mCountFloatp; + const LLTrace::TraceType* mEventFloatp; + const LLTrace::TraceType* mSampleFloatp; LLUIString mLabel; std::string mUnitLabel; -- cgit v1.2.3 From 9faaa28f4445425e8c5b7b002faffbe0365b905d Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 13 Aug 2013 18:33:07 -0700 Subject: SH-4346 FIX Interesting: some integer Statistics are displayed as floating point after crossing region boundary fine-tuned heuristics for switching between mean and current values in stat bar display added comments to LLUnits unit test --- indra/llui/llstatbar.h | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) (limited to 'indra/llui/llstatbar.h') diff --git a/indra/llui/llstatbar.h b/indra/llui/llstatbar.h index dd4d9400a5..bf2bd3e259 100755 --- a/indra/llui/llstatbar.h +++ b/indra/llui/llstatbar.h @@ -56,24 +56,7 @@ public: Optional stat; Optional orientation; - Params() - : label("label"), - unit_label("unit_label"), - bar_min("bar_min", 0.f), - bar_max("bar_max", 0.f), - tick_spacing("tick_spacing", 0.f), - decimal_digits("decimal_digits", 3), - show_bar("show_bar", false), - show_history("show_history", false), - scale_range("scale_range", true), - num_frames("num_frames", 200), - num_frames_short("num_frames_short", 20), - max_height("max_height", 100), - stat("stat"), - orientation("orientation", VERTICAL) - { - changeDefault(follows.flags, FOLLOWS_TOP | FOLLOWS_LEFT); - } + Params(); }; LLStatBar(const Params&); -- cgit v1.2.3 From 2c6bc5afa59a88136fd6de4ebf0cb99ea7cdef3f Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 21 Aug 2013 14:06:57 -0700 Subject: SH-4433 WIP Interesting: Statistics > Ping Sim is always 0 ms made getPrimaryAccumulator return a reference since it was an always non-null pointer changed unit conversion to perform lazy division in order to avoid truncation of timer values --- indra/llui/llstatbar.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llui/llstatbar.h') diff --git a/indra/llui/llstatbar.h b/indra/llui/llstatbar.h index bf2bd3e259..f311e4a13c 100755 --- a/indra/llui/llstatbar.h +++ b/indra/llui/llstatbar.h @@ -72,7 +72,7 @@ public: /*virtual*/ LLRect getRequiredRect(); // Return the height of this object, given the set options. private: - void drawLabelAndValue( F32 mean, std::string &unit_label, LLRect &bar_rect ); + void drawLabelAndValue( F32 mean, std::string &unit_label, LLRect &bar_rect, S32 decimal_digits ); void drawTicks( F32 min, F32 max, F32 value_scale, LLRect &bar_rect ); F32 mMinBar, -- cgit v1.2.3 From 0dfc08d22a21728ec670bd75e6fd0ed60c97bf06 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 19 Sep 2013 15:21:46 -0700 Subject: BUILDFIX: more bad merge stuff also added ability for statbar to show memtrackable info --- indra/llui/llstatbar.h | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'indra/llui/llstatbar.h') diff --git a/indra/llui/llstatbar.h b/indra/llui/llstatbar.h index f311e4a13c..5e9255b9eb 100755 --- a/indra/llui/llstatbar.h +++ b/indra/llui/llstatbar.h @@ -93,9 +93,23 @@ private: F32 mLastDisplayValue; LLFrameTimer mLastDisplayValueTimer; - const LLTrace::TraceType* mCountFloatp; - const LLTrace::TraceType* mEventFloatp; - const LLTrace::TraceType* mSampleFloatp; + enum + { + STAT_NONE, + STAT_COUNT, + STAT_EVENT, + STAT_SAMPLE, + STAT_MEM + } mStatType; + + union + { + void* valid; + const LLTrace::TraceType* countStatp; + const LLTrace::TraceType* eventStatp; + const LLTrace::TraceType* sampleStatp; + const LLTrace::TraceType* memStatp; + } mStat; LLUIString mLabel; std::string mUnitLabel; -- cgit v1.2.3 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.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/llui/llstatbar.h') diff --git a/indra/llui/llstatbar.h b/indra/llui/llstatbar.h index 5e9255b9eb..57e492bc80 100755 --- a/indra/llui/llstatbar.h +++ b/indra/llui/llstatbar.h @@ -105,10 +105,10 @@ private: union { void* valid; - const LLTrace::TraceType* countStatp; - const LLTrace::TraceType* eventStatp; - const LLTrace::TraceType* sampleStatp; - const LLTrace::TraceType* memStatp; + const LLTrace::StatType* countStatp; + const LLTrace::StatType* eventStatp; + const LLTrace::StatType* sampleStatp; + const LLTrace::StatType* memStatp; } mStat; LLUIString mLabel; -- cgit v1.2.3 From ea2494a0839ec02d3889a405306009c2f4f9aea7 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 30 Oct 2013 00:37:11 -0700 Subject: stats now autoscale back down in range, instead of sticking at high water mark --- indra/llui/llstatbar.h | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) (limited to 'indra/llui/llstatbar.h') diff --git a/indra/llui/llstatbar.h b/indra/llui/llstatbar.h index 57e492bc80..89d7ff24ed 100755 --- a/indra/llui/llstatbar.h +++ b/indra/llui/llstatbar.h @@ -44,13 +44,12 @@ public: bar_max, tick_spacing; - Optional decimal_digits; - Optional show_bar, show_history, scale_range; - Optional num_frames, + Optional decimal_digits, + num_frames, num_frames_short, max_height; Optional stat; @@ -67,7 +66,7 @@ public: void setStat(const std::string& stat_name); void setRange(F32 bar_min, F32 bar_max); - void getRange(F32& bar_min, F32& bar_max) { bar_min = mMinBar; bar_max = mMaxBar; } + void getRange(F32& bar_min, F32& bar_max) { bar_min = mTargetMinBar; bar_max = mTargetMaxBar; } /*virtual*/ LLRect getRequiredRect(); // Return the height of this object, given the set options. @@ -75,20 +74,18 @@ private: void drawLabelAndValue( F32 mean, std::string &unit_label, LLRect &bar_rect, S32 decimal_digits ); void drawTicks( F32 min, F32 max, F32 value_scale, LLRect &bar_rect ); - F32 mMinBar, - mMaxBar, + F32 mTargetMinBar, + mTargetMaxBar, + mFloatingTargetMinBar, + mFloatingTargetMaxBar, mCurMaxBar, mCurMinBar, - mLabelSpacing; - F32 mTickValue; - U32 mDecimalDigits; - S32 mNumHistoryFrames, + mLabelSpacing, + mTickSpacing; + S32 mDecimalDigits, + mNumHistoryFrames, mNumShortHistoryFrames; S32 mMaxHeight; - bool mDisplayBar, // Display the bar graph. - mDisplayHistory, - mAutoScaleMax, - mAutoScaleMin; EOrientation mOrientation; F32 mLastDisplayValue; LLFrameTimer mLastDisplayValueTimer; @@ -113,6 +110,11 @@ private: LLUIString mLabel; std::string mUnitLabel; + + bool mDisplayBar, // Display the bar graph. + mDisplayHistory, + mAutoScaleMax, + mAutoScaleMin; }; #endif -- cgit v1.2.3