summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorRichard Linden <none@none>2013-05-20 19:28:20 -0700
committerRichard Linden <none@none>2013-05-20 19:28:20 -0700
commit11cee0c140af90564f5616d3464f29abae4d585f (patch)
tree16c6faf318d805aaaceb7c196d91170e92564b77 /indra/newview
parent13f43fdc5bd046f7857f06254c84b8993bdcc50a (diff)
parentab5106535758393e02b075d1e404e4e1fcf81abf (diff)
Automated merge with ssh://hg.lindenlab.com/richard/viewer-interesting
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llfasttimerview.cpp7
-rw-r--r--indra/newview/llfasttimerview.h1
-rw-r--r--indra/newview/llscenemonitor.cpp6
-rw-r--r--indra/newview/llviewerstats.cpp23
-rw-r--r--indra/newview/skins/default/xui/en/floater_stats.xml2
5 files changed, 19 insertions, 20 deletions
diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp
index 45ffe56ac1..b78dd08bf1 100644
--- a/indra/newview/llfasttimerview.cpp
+++ b/indra/newview/llfasttimerview.cpp
@@ -422,13 +422,6 @@ void LLFastTimerView::draw()
mHoverBarIndex = -1;
}
-F64 LLFastTimerView::getTime(const std::string& name)
-{
- //TODO: replace calls to this with use of timer object directly
- //llstatic_assert(false, "TODO: implement");
- return 0.0;
-}
-
void saveChart(const std::string& label, const char* suffix, LLImageRaw* scratch)
{
//read result back into raw image
diff --git a/indra/newview/llfasttimerview.h b/indra/newview/llfasttimerview.h
index 8b9ad290bc..341adacd65 100644
--- a/indra/newview/llfasttimerview.h
+++ b/indra/newview/llfasttimerview.h
@@ -62,7 +62,6 @@ public:
virtual void draw();
LLTrace::TimeBlock* getLegendID(S32 y);
- F64 getTime(const std::string& name);
protected:
virtual void onClickCloseBtn();
diff --git a/indra/newview/llscenemonitor.cpp b/indra/newview/llscenemonitor.cpp
index b7517a057e..b303dfbdb4 100644
--- a/indra/newview/llscenemonitor.cpp
+++ b/indra/newview/llscenemonitor.cpp
@@ -270,10 +270,12 @@ void LLSceneMonitor::capture()
static LLFrameTimer timer;
LLTrace::Recording& last_frame_recording = LLTrace::get_frame_recording().getLastRecording();
- if (last_frame_recording.getSum(*LLViewerCamera::getVelocityStat()) > 0.001f
- || last_frame_recording.getSum(*LLViewerCamera::getAngularVelocityStat()) > 0.01f)
+ if (mEnabled
+ && (last_frame_recording.getSum(*LLViewerCamera::getVelocityStat()) > 0.001f
+ || last_frame_recording.getSum(*LLViewerCamera::getAngularVelocityStat()) > 0.01f))
{
reset();
+ freezeScene();
}
bool enabled = monitor_enabled || mDebugViewerVisible;
diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp
index 13a005dcbf..e8196e9655 100644
--- a/indra/newview/llviewerstats.cpp
+++ b/indra/newview/llviewerstats.cpp
@@ -64,7 +64,7 @@
namespace LLStatViewer
{
-LLTrace::CountStatHandle<> FPS("fpsstat"),
+LLTrace::CountStatHandle<> FPS("framesrendered"),
PACKETS_IN("packetsinstat"),
PACKETS_LOST("packetsloststat"),
PACKETS_OUT("packetsoutstat"),
@@ -322,19 +322,24 @@ void update_statistics()
add(LLStatViewer::TOOLBOX_TIME, gFrameIntervalSeconds);
}
}
+
+ LLTrace::Recording& last_frame_recording = LLTrace::get_frame_recording().getLastRecording();
+
sample(LLStatViewer::ENABLE_VBO, (F64)gSavedSettings.getBOOL("RenderVBOEnable"));
sample(LLStatViewer::LIGHTING_DETAIL, (F64)gPipeline.getLightingDetail());
sample(LLStatViewer::DRAW_DISTANCE, (F64)gSavedSettings.getF32("RenderFarClip"));
sample(LLStatViewer::CHAT_BUBBLES, (F64)gSavedSettings.getBOOL("UseChatBubbles"));
- sample(LLStatViewer::FRAME_STACKTIME, LLTrace::Seconds(gDebugView->mFastTimerView->getTime("Frame")));
- F64 idle_secs = gDebugView->mFastTimerView->getTime("Idle");
- F64 network_secs = gDebugView->mFastTimerView->getTime("Network");
- sample(LLStatViewer::UPDATE_STACKTIME, LLTrace::Seconds(idle_secs - network_secs));
- sample(LLStatViewer::NETWORK_STACKTIME, LLTrace::Seconds(network_secs));
- sample(LLStatViewer::IMAGE_STACKTIME, LLTrace::Seconds(gDebugView->mFastTimerView->getTime("Update Images")));
- sample(LLStatViewer::REBUILD_STACKTIME, LLTrace::Seconds(gDebugView->mFastTimerView->getTime("Sort Draw State")));
- sample(LLStatViewer::RENDER_STACKTIME, LLTrace::Seconds(gDebugView->mFastTimerView->getTime("Geometry")));
+ typedef LLInstanceTracker<LLTrace::TraceType<LLTrace::TimeBlockAccumulator>, std::string> trace_type_t;
+
+ sample(LLStatViewer::FRAME_STACKTIME, last_frame_recording.getSum(*trace_type_t::getInstance("Frame")).as<LLUnits::Seconds>());
+ LLUnit<LLUnits::Seconds, F64> idle_secs = last_frame_recording.getSum(*trace_type_t::getInstance("Idle"));
+ LLUnit<LLUnits::Seconds, F64> network_secs = last_frame_recording.getSum(*trace_type_t::getInstance("Network"));
+ sample(LLStatViewer::UPDATE_STACKTIME, idle_secs - network_secs);
+ sample(LLStatViewer::NETWORK_STACKTIME, network_secs);
+ sample(LLStatViewer::IMAGE_STACKTIME, last_frame_recording.getSum(*trace_type_t::getInstance("Update Images")).as<LLUnits::Seconds>());
+ sample(LLStatViewer::REBUILD_STACKTIME, last_frame_recording.getSum(*trace_type_t::getInstance("Sort Draw State")).as<LLUnits::Seconds>());
+ sample(LLStatViewer::RENDER_STACKTIME, last_frame_recording.getSum(*trace_type_t::getInstance("Render Geometry")).as<LLUnits::Seconds>());
LLCircuitData *cdp = gMessageSystem->mCircuitInfo.findCircuit(gAgent.getRegion()->getHost());
if (cdp)
diff --git a/indra/newview/skins/default/xui/en/floater_stats.xml b/indra/newview/skins/default/xui/en/floater_stats.xml
index f98fcc349e..0493f487d4 100644
--- a/indra/newview/skins/default/xui/en/floater_stats.xml
+++ b/indra/newview/skins/default/xui/en/floater_stats.xml
@@ -38,7 +38,7 @@
name="fps"
label="FPS"
unit_label="fps"
- stat="fpsstat"
+ stat="framesrendered"
bar_min="0"
bar_max="60"
tick_spacing="6"