summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorRichard Linden <none@none>2013-06-19 20:30:41 -0700
committerRichard Linden <none@none>2013-06-19 20:30:41 -0700
commit3fe19d883d2856cd7d104810b794eee82d642a3e (patch)
treebdc9a1ad5ee92ff6642ae7f025ded131585cc7db /indra/newview
parent1236c920eaa01a2e396b656b292429b51e2360cf (diff)
SH-3931 WIP Interesting: Add graphs to visualize scene load metrics
scene monitor output is cleaned up, no duplicate first frame, less scientific notation periodic recording extension now works more cleanly
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/llfasttimerview.h11
-rw-r--r--indra/newview/llscenemonitor.cpp26
-rw-r--r--indra/newview/llscenemonitor.h2
3 files changed, 24 insertions, 15 deletions
diff --git a/indra/newview/llfasttimerview.h b/indra/newview/llfasttimerview.h
index d931f25a7e..9d88bb2d3f 100755
--- a/indra/newview/llfasttimerview.h
+++ b/indra/newview/llfasttimerview.h
@@ -103,6 +103,11 @@ private:
struct TimerBarRow
{
+ TimerBarRow()
+ : mBottom(0),
+ mTop(0),
+ mBars(NULL)
+ {}
S32 mBottom,
mTop;
TimerBar* mBars;
@@ -118,9 +123,9 @@ private:
enum EDisplayType
{
- TIME,
- CALLS,
- HZ
+ DISPLAY_TIME,
+ DISPLAY_CALLS,
+ DISPLAY_HZ
} mDisplayType;
bool mPauseHistory;
LLUnit<F64, LLUnits::Seconds> mAllTimeMax,
diff --git a/indra/newview/llscenemonitor.cpp b/indra/newview/llscenemonitor.cpp
index 8086745471..ed9eeb9330 100644
--- a/indra/newview/llscenemonitor.cpp
+++ b/indra/newview/llscenemonitor.cpp
@@ -500,7 +500,7 @@ void LLSceneMonitor::dumpToFile(std::string file_name)
std::ofstream os(file_name.c_str());
- os << std::setprecision(3);
+ os << std::setprecision(10);
PeriodicRecording& scene_load_recording = mSceneLoadRecording.getAcceptedRecording();
const U32 frame_count = scene_load_recording.getNumRecordedPeriods();
@@ -508,12 +508,12 @@ void LLSceneMonitor::dumpToFile(std::string file_name)
LLUnit<F64, LLUnits::Seconds> frame_time;
os << "Stat";
- for (S32 frame = 0; frame < frame_count; frame++)
+ for (S32 frame = 1; frame <= frame_count; frame++)
{
frame_time += scene_load_recording.getPrevRecording(frame_count - frame).getDuration();
os << ", " << frame_time.value();
}
- os << std::endl;
+ os << '\n';
typedef TraceType<CountAccumulator> trace_count;
for (trace_count::instance_iter it = trace_count::beginInstances(), end_it = trace_count::endInstances();
@@ -521,6 +521,8 @@ void LLSceneMonitor::dumpToFile(std::string file_name)
++it)
{
std::ostringstream row;
+ row << std::setprecision(10);
+
row << it->getName();
const char* unit_label = it->getUnitLabel();
@@ -531,13 +533,13 @@ void LLSceneMonitor::dumpToFile(std::string file_name)
S32 samples = 0;
- for (S32 frame = 0; frame < frame_count; frame++)
+ for (S32 frame = 1; frame <= frame_count; frame++)
{
samples += scene_load_recording.getPrevRecording(frame_count - frame).getSampleCount(*it);
row << ", " << scene_load_recording.getPrevRecording(frame_count - frame).getSum(*it);
}
- row << std::endl;
+ row << '\n';
if (samples > 0)
{
@@ -552,6 +554,7 @@ void LLSceneMonitor::dumpToFile(std::string file_name)
++it)
{
std::ostringstream row;
+ row << std::setprecision(10);
row << it->getName();
const char* unit_label = it->getUnitLabel();
@@ -562,13 +565,13 @@ void LLSceneMonitor::dumpToFile(std::string file_name)
S32 samples = 0;
- for (S32 frame = 0; frame < frame_count; frame++)
+ for (S32 frame = 1; frame <= frame_count; frame++)
{
samples += scene_load_recording.getPrevRecording(frame_count - frame).getSampleCount(*it);
row << ", " << scene_load_recording.getPrevRecording(frame_count - frame).getMean(*it);
}
- row << std::endl;
+ row << '\n';
if (samples > 0)
{
@@ -583,6 +586,7 @@ void LLSceneMonitor::dumpToFile(std::string file_name)
++it)
{
std::ostringstream row;
+ row << std::setprecision(10);
row << it->getName();
const char* unit_label = it->getUnitLabel();
@@ -593,13 +597,13 @@ void LLSceneMonitor::dumpToFile(std::string file_name)
S32 samples = 0;
- for (S32 frame = 0; frame < frame_count; frame++)
+ for (S32 frame = 1; frame <= frame_count; frame++)
{
samples += scene_load_recording.getPrevRecording(frame_count - frame).getSampleCount(*it);
row << ", " << scene_load_recording.getPrevRecording(frame_count - frame).getMean(*it);
}
- row << std::endl;
+ row << '\n';
if (samples > 0)
{
@@ -614,12 +618,12 @@ void LLSceneMonitor::dumpToFile(std::string file_name)
{
os << it->getName() << "(KiB)";
- for (S32 frame = 0; frame < frame_count; frame++)
+ for (S32 frame = 1; frame <= frame_count; frame++)
{
os << ", " << scene_load_recording.getPrevRecording(frame_count - frame).getMax(*it).getAs<LLUnits::Kibibytes>();
}
- os << std::endl;
+ os << '\n';
}
os.flush();
diff --git a/indra/newview/llscenemonitor.h b/indra/newview/llscenemonitor.h
index 6af58b707a..9717310da4 100644
--- a/indra/newview/llscenemonitor.h
+++ b/indra/newview/llscenemonitor.h
@@ -37,7 +37,7 @@ class LLCharacter;
class LLRenderTarget;
class LLViewerTexture;
-class LLSceneMonitor : public LLSingleton<LLSceneMonitor>
+class LLSceneMonitor : public LLSingleton<LLSceneMonitor>
{
LOG_CLASS(LLSceneMonitor);
public: