diff options
author | Monty Brandenberg <monty@lindenlab.com> | 2013-05-13 18:34:54 -0400 |
---|---|---|
committer | Monty Brandenberg <monty@lindenlab.com> | 2013-05-13 18:34:54 -0400 |
commit | 73f474d886d2430db3d5c8f7729f769b389730a4 (patch) | |
tree | 5b1f481284a030c72ac08d8b3027ed608bc3ceb6 /indra/newview/llviewerstatsrecorder.cpp | |
parent | 81ffd3fccac709a5903dd0d7572db50c50850347 (diff) | |
parent | 180dd12ed637c1f63a5013d25fbac002e1d94c93 (diff) |
Merge. Refresh from /lindenlab/viewer-cat prior to pushing.
Diffstat (limited to 'indra/newview/llviewerstatsrecorder.cpp')
-rwxr-xr-x[-rw-r--r--] | indra/newview/llviewerstatsrecorder.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/indra/newview/llviewerstatsrecorder.cpp b/indra/newview/llviewerstatsrecorder.cpp index 91e485d01b..f9a725547f 100644..100755 --- a/indra/newview/llviewerstatsrecorder.cpp +++ b/indra/newview/llviewerstatsrecorder.cpp @@ -187,6 +187,7 @@ void LLViewerStatsRecorder::writeToLog( F32 interval ) << mObjectUpdateFailures << " update failures" << llendl; + U32 data_size; if (mObjectCacheFile == NULL) { mStartTime = LLTimer::getTotalSeconds(); @@ -216,7 +217,11 @@ void LLViewerStatsRecorder::writeToLog( F32 interval ) << "Texture Fetch bps\t" << "\n"; - fwrite(data_msg.str().c_str(), 1, data_msg.str().size(), mObjectCacheFile ); + data_size = data_msg.str().size(); + if (fwrite(data_msg.str().c_str(), 1, data_size, mObjectCacheFile ) != data_size) + { + llwarns << "failed to write full headers to " << STATS_FILE_NAME << llendl; + } } else { @@ -249,7 +254,12 @@ void LLViewerStatsRecorder::writeToLog( F32 interval ) << "\t" << (mTextureFetchSize * 8 / delta_time) << "\n"; - fwrite(data_msg.str().c_str(), 1, data_msg.str().size(), mObjectCacheFile ); + data_size = data_msg.str().size(); + if (fwrite(data_msg.str().c_str(), 1, data_size, mObjectCacheFile ) != data_size) + { + llwarns << "failed to write full stats to " << STATS_FILE_NAME << llendl; + } + clearStats(); } |