summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerstats.cpp
diff options
context:
space:
mode:
authorRichard Linden <none@none>2013-07-30 19:13:45 -0700
committerRichard Linden <none@none>2013-07-30 19:13:45 -0700
commita2e22732f195dc075a733c79f15156752f522a43 (patch)
treec708db3a28ae578b3b6d8f1cc94935937efd9a1e /indra/newview/llviewerstats.cpp
parent19f7fb6ccce52224cc067e496d1480191badb165 (diff)
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
Diffstat (limited to 'indra/newview/llviewerstats.cpp')
-rwxr-xr-xindra/newview/llviewerstats.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp
index 69a6c00a8f..94be8e2a83 100755
--- a/indra/newview/llviewerstats.cpp
+++ b/indra/newview/llviewerstats.cpp
@@ -92,6 +92,9 @@ LLTrace::CountStatHandle<> FPS("FPS", "Frames rendered"),
LLTrace::CountStatHandle<LLUnit<F64, LLUnits::Kilotriangles> >
TRIANGLES_DRAWN("trianglesdrawnstat");
+LLTrace::EventStatHandle<LLUnit<F64, LLUnits::Kilotriangles> >
+ TRIANGLES_DRAWN_PER_FRAME("trianglesdrawnperframestat");
+
LLTrace::CountStatHandle<LLUnit<F64, LLUnits::Kibibytes> >
ACTIVE_MESSAGE_DATA_RECEIVED("activemessagedatareceived", "Message system data received on all active regions"),
LAYERS_NETWORK_DATA_RECEIVED("layersdatareceived", "Network data received for layer data (terrain)"),
@@ -213,38 +216,37 @@ void LLViewerStats::resetStats()
LLViewerStats::instance().mRecording.reset();
}
-void LLViewerStats::updateFrameStats(const F64 time_diff)
+void LLViewerStats::updateFrameStats(const LLUnit<F64, LLUnits::Seconds> time_diff)
{
- LLUnit<F64, LLUnits::Seconds> time_diff_seconds(time_diff);
if (getRecording().getLastValue(LLStatViewer::PACKETS_LOST_PERCENT) > 5.0)
{
- add(LLStatViewer::LOSS_5_PERCENT_TIME, time_diff_seconds);
+ add(LLStatViewer::LOSS_5_PERCENT_TIME, time_diff);
}
F32 sim_fps = getRecording().getLastValue(LLStatViewer::SIM_FPS);
if (0.f < sim_fps && sim_fps < 20.f)
{
- add(LLStatViewer::SIM_20_FPS_TIME, time_diff_seconds);
+ add(LLStatViewer::SIM_20_FPS_TIME, time_diff);
}
F32 sim_physics_fps = getRecording().getLastValue(LLStatViewer::SIM_PHYSICS_FPS);
if (0.f < sim_physics_fps && sim_physics_fps < 20.f)
{
- add(LLStatViewer::SIM_PHYSICS_20_FPS_TIME, time_diff_seconds);
+ add(LLStatViewer::SIM_PHYSICS_20_FPS_TIME, time_diff);
}
if (time_diff >= 0.5)
{
- record(LLStatViewer::FPS_2_TIME, time_diff_seconds);
+ record(LLStatViewer::FPS_2_TIME, time_diff);
}
if (time_diff >= 0.125)
{
- record(LLStatViewer::FPS_8_TIME, time_diff_seconds);
+ record(LLStatViewer::FPS_8_TIME, time_diff);
}
if (time_diff >= 0.1)
{
- record(LLStatViewer::FPS_10_TIME, time_diff_seconds);
+ record(LLStatViewer::FPS_10_TIME, time_diff);
}
if (gFrameCount && mLastTimeDiff > 0.0)
@@ -331,6 +333,8 @@ void update_statistics()
LLTrace::Recording& last_frame_recording = LLTrace::get_frame_recording().getLastRecording();
+ record(LLStatViewer::TRIANGLES_DRAWN_PER_FRAME, last_frame_recording.getSum(LLStatViewer::TRIANGLES_DRAWN));
+
sample(LLStatViewer::ENABLE_VBO, (F64)gSavedSettings.getBOOL("RenderVBOEnable"));
sample(LLStatViewer::LIGHTING_DETAIL, (F64)gPipeline.getLightingDetail());
sample(LLStatViewer::DRAW_DISTANCE, (F64)gSavedSettings.getF32("RenderFarClip"));