diff options
Diffstat (limited to 'indra/newview/llscenemonitor.cpp')
-rw-r--r-- | indra/newview/llscenemonitor.cpp | 37 |
1 files changed, 28 insertions, 9 deletions
diff --git a/indra/newview/llscenemonitor.cpp b/indra/newview/llscenemonitor.cpp index 7fafabb493..ecffc67993 100644 --- a/indra/newview/llscenemonitor.cpp +++ b/indra/newview/llscenemonitor.cpp @@ -274,17 +274,17 @@ void LLSceneMonitor::capture() if(mEnabled != enabled) { if(mEnabled) - { + { + mEnabled = enabled; unfreezeScene(); reset(); force_capture = true; } else { + mEnabled = enabled; freezeScene(); } - - mEnabled = enabled; } if (mEnabled @@ -565,8 +565,9 @@ void LLSceneMonitor::dumpToFile(std::string file_name) 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); + Recording& recording = scene_load_recording.getPrevRecording(frame_count - frame); + samples += recording.getSampleCount(*it); + row << ", " << recording.getSum(*it); } row << '\n'; @@ -597,8 +598,17 @@ void LLSceneMonitor::dumpToFile(std::string file_name) 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); + Recording& recording = scene_load_recording.getPrevRecording(frame_count - frame); + samples += recording.getSampleCount(*it); + F64 mean = recording.getMean(*it); + if (llisnan(mean)) + { + row << ", n/a"; + } + else + { + row << ", " << mean; + } } row << '\n'; @@ -629,8 +639,17 @@ void LLSceneMonitor::dumpToFile(std::string file_name) 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); + Recording& recording = scene_load_recording.getPrevRecording(frame_count - frame); + samples += recording.getSampleCount(*it); + F64 mean = recording.getMean(*it); + if (llisnan(mean)) + { + row << ", n/a"; + } + else + { + row << ", " << mean; + } } row << '\n'; |