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/newview/llfloaterjoystick.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llfloaterjoystick.cpp') diff --git a/indra/newview/llfloaterjoystick.cpp b/indra/newview/llfloaterjoystick.cpp index d0c22d25f2..f7b2670b8e 100644 --- a/indra/newview/llfloaterjoystick.cpp +++ b/indra/newview/llfloaterjoystick.cpp @@ -61,7 +61,7 @@ void LLFloaterJoystick::draw() for (U32 i = 0; i < 6; i++) { F32 value = joystick->getJoystickAxis(i); - mAxisStats[i]->addValue(value * gFrameIntervalSeconds); + mAxisStats[i]->addValue(value * gFrameIntervalSeconds.value()); if (mAxisStatsBar[i]) { F32 minbar, maxbar; -- 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/newview/llfloaterjoystick.cpp | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'indra/newview/llfloaterjoystick.cpp') diff --git a/indra/newview/llfloaterjoystick.cpp b/indra/newview/llfloaterjoystick.cpp index f7b2670b8e..e2813a8272 100644 --- a/indra/newview/llfloaterjoystick.cpp +++ b/indra/newview/llfloaterjoystick.cpp @@ -33,7 +33,7 @@ #include "llerror.h" #include "llrect.h" #include "llstring.h" -#include "llstat.h" +#include "lltrace.h" // project includes #include "lluictrlfactory.h" @@ -42,6 +42,16 @@ #include "llviewerjoystick.h" #include "llcheckboxctrl.h" +static LLTrace::Measurement<> sJoystickAxes[6] = +{ + LLTrace::Measurement<>("Joystick axis 1"), + LLTrace::Measurement<>("Joystick axis 2"), + LLTrace::Measurement<>("Joystick axis 3"), + LLTrace::Measurement<>("Joystick axis 4"), + LLTrace::Measurement<>("Joystick axis 5"), + LLTrace::Measurement<>("Joystick axis 6") +}; + LLFloaterJoystick::LLFloaterJoystick(const LLSD& data) : LLFloater(data) { @@ -61,7 +71,7 @@ void LLFloaterJoystick::draw() for (U32 i = 0; i < 6; i++) { F32 value = joystick->getJoystickAxis(i); - mAxisStats[i]->addValue(value * gFrameIntervalSeconds.value()); + sJoystickAxes[i].sample(value * gFrameIntervalSeconds.value()); if (mAxisStatsBar[i]) { F32 minbar, maxbar; @@ -85,12 +95,11 @@ BOOL LLFloaterJoystick::postBuild() for (U32 i = 0; i < 6; i++) { std::string stat_name(llformat("Joystick axis %d", i)); - mAxisStats[i] = new LLStat(stat_name, 4); std::string axisname = llformat("axis%d", i); mAxisStatsBar[i] = getChild(axisname); if (mAxisStatsBar[i]) { - mAxisStatsBar[i]->setStat(mAxisStats[i]); + mAxisStatsBar[i]->setStat(stat_name); mAxisStatsBar[i]->setRange(-range, range, range * 0.25f, range * 0.5f); } } -- cgit v1.2.3 From 8b836f776a69b81b08e7f6429ee707f56825c51a Mon Sep 17 00:00:00 2001 From: Andrew Meadows Date: Thu, 10 Jan 2013 00:14:46 +0000 Subject: gcc fixes --- indra/newview/llfloaterjoystick.cpp | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'indra/newview/llfloaterjoystick.cpp') diff --git a/indra/newview/llfloaterjoystick.cpp b/indra/newview/llfloaterjoystick.cpp index e2813a8272..ab7fc1cf3f 100644 --- a/indra/newview/llfloaterjoystick.cpp +++ b/indra/newview/llfloaterjoystick.cpp @@ -42,14 +42,20 @@ #include "llviewerjoystick.h" #include "llcheckboxctrl.h" -static LLTrace::Measurement<> sJoystickAxes[6] = +static LLTrace::Measurement<> sJoystickAxis1("Joystick axis 1"), + sJoystickAxis2("Joystick axis 2"), + sJoystickAxis3("Joystick axis 3"), + sJoystickAxis4("Joystick axis 4"), + sJoystickAxis5("Joystick axis 5"), + sJoystickAxis6("Joystick axis 6"); +static LLTrace::Measurement<>* sJoystickAxes[6] = { - LLTrace::Measurement<>("Joystick axis 1"), - LLTrace::Measurement<>("Joystick axis 2"), - LLTrace::Measurement<>("Joystick axis 3"), - LLTrace::Measurement<>("Joystick axis 4"), - LLTrace::Measurement<>("Joystick axis 5"), - LLTrace::Measurement<>("Joystick axis 6") + &sJoystickAxis1, + &sJoystickAxis2, + &sJoystickAxis3, + &sJoystickAxis4, + &sJoystickAxis5, + &sJoystickAxis6 }; LLFloaterJoystick::LLFloaterJoystick(const LLSD& data) @@ -71,7 +77,7 @@ void LLFloaterJoystick::draw() for (U32 i = 0; i < 6; i++) { F32 value = joystick->getJoystickAxis(i); - sJoystickAxes[i].sample(value * gFrameIntervalSeconds.value()); + sJoystickAxes[i]->sample(value * gFrameIntervalSeconds.value()); if (mAxisStatsBar[i]) { F32 minbar, maxbar; -- cgit v1.2.3 From f07b9c2c69f1f6882dcf249aacf33cdfacf878ab Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 6 Mar 2013 11:08:25 -0800 Subject: renamed LLTrace stat gathering classes/methods to make the structure of LLTrace clearer Count becomes CountStatHandle Count.sum becomes sum(Count, value), etc. --- indra/newview/llfloaterjoystick.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'indra/newview/llfloaterjoystick.cpp') diff --git a/indra/newview/llfloaterjoystick.cpp b/indra/newview/llfloaterjoystick.cpp index ab7fc1cf3f..25c119d9e1 100644 --- a/indra/newview/llfloaterjoystick.cpp +++ b/indra/newview/llfloaterjoystick.cpp @@ -42,13 +42,13 @@ #include "llviewerjoystick.h" #include "llcheckboxctrl.h" -static LLTrace::Measurement<> sJoystickAxis1("Joystick axis 1"), - sJoystickAxis2("Joystick axis 2"), - sJoystickAxis3("Joystick axis 3"), - sJoystickAxis4("Joystick axis 4"), - sJoystickAxis5("Joystick axis 5"), - sJoystickAxis6("Joystick axis 6"); -static LLTrace::Measurement<>* sJoystickAxes[6] = +static LLTrace::MeasurementStatHandle<> sJoystickAxis1("Joystick axis 1"), + sJoystickAxis2("Joystick axis 2"), + sJoystickAxis3("Joystick axis 3"), + sJoystickAxis4("Joystick axis 4"), + sJoystickAxis5("Joystick axis 5"), + sJoystickAxis6("Joystick axis 6"); +static LLTrace::MeasurementStatHandle<>* sJoystickAxes[6] = { &sJoystickAxis1, &sJoystickAxis2, -- cgit v1.2.3 From 4e3fddf271e6ff4557f594b6a8c036ab2a4e413f Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Fri, 8 Mar 2013 17:08:00 -0800 Subject: fixed remaining sample and add calls --- indra/newview/llfloaterjoystick.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llfloaterjoystick.cpp') diff --git a/indra/newview/llfloaterjoystick.cpp b/indra/newview/llfloaterjoystick.cpp index 25c119d9e1..7fcebc965a 100644 --- a/indra/newview/llfloaterjoystick.cpp +++ b/indra/newview/llfloaterjoystick.cpp @@ -77,7 +77,7 @@ void LLFloaterJoystick::draw() for (U32 i = 0; i < 6; i++) { F32 value = joystick->getJoystickAxis(i); - sJoystickAxes[i]->sample(value * gFrameIntervalSeconds.value()); + sample(*sJoystickAxes[i], value * gFrameIntervalSeconds.value()); if (mAxisStatsBar[i]) { F32 minbar, maxbar; -- 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/newview/llfloaterjoystick.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llfloaterjoystick.cpp') diff --git a/indra/newview/llfloaterjoystick.cpp b/indra/newview/llfloaterjoystick.cpp index 7fcebc965a..dbdf3e5e9f 100644 --- a/indra/newview/llfloaterjoystick.cpp +++ b/indra/newview/llfloaterjoystick.cpp @@ -85,7 +85,7 @@ void LLFloaterJoystick::draw() if (llabs(value) > maxbar) { F32 range = llabs(value); - mAxisStatsBar[i]->setRange(-range, range, range * 0.25f, range * 0.5f); + mAxisStatsBar[i]->setRange(-range, range, range * 0.25f); } } } @@ -106,7 +106,7 @@ BOOL LLFloaterJoystick::postBuild() if (mAxisStatsBar[i]) { mAxisStatsBar[i]->setStat(stat_name); - mAxisStatsBar[i]->setRange(-range, range, range * 0.25f, range * 0.5f); + mAxisStatsBar[i]->setRange(-range, range, range * 0.25f); } } -- 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/newview/llfloaterjoystick.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'indra/newview/llfloaterjoystick.cpp') diff --git a/indra/newview/llfloaterjoystick.cpp b/indra/newview/llfloaterjoystick.cpp index dbdf3e5e9f..b71ab4c53b 100644 --- a/indra/newview/llfloaterjoystick.cpp +++ b/indra/newview/llfloaterjoystick.cpp @@ -42,13 +42,13 @@ #include "llviewerjoystick.h" #include "llcheckboxctrl.h" -static LLTrace::MeasurementStatHandle<> sJoystickAxis1("Joystick axis 1"), - sJoystickAxis2("Joystick axis 2"), - sJoystickAxis3("Joystick axis 3"), - sJoystickAxis4("Joystick axis 4"), - sJoystickAxis5("Joystick axis 5"), - sJoystickAxis6("Joystick axis 6"); -static LLTrace::MeasurementStatHandle<>* sJoystickAxes[6] = +static LLTrace::SampleStatHandle<> sJoystickAxis1("Joystick axis 1"), + sJoystickAxis2("Joystick axis 2"), + sJoystickAxis3("Joystick axis 3"), + sJoystickAxis4("Joystick axis 4"), + sJoystickAxis5("Joystick axis 5"), + sJoystickAxis6("Joystick axis 6"); +static LLTrace::SampleStatHandle<>* sJoystickAxes[6] = { &sJoystickAxis1, &sJoystickAxis2, -- cgit v1.2.3