diff options
| author | Richard Linden <none@none> | 2013-03-22 00:44:59 -0700 |
|---|---|---|
| committer | Richard Linden <none@none> | 2013-03-22 00:44:59 -0700 |
| commit | 68f9f656cd22332e46959a90347e38f79c19a66c (patch) | |
| tree | 531d87287b69f500c5901f785e60483555b415f9 /indra/newview/llviewerstatsrecorder.cpp | |
| parent | e87000ba0750e55d9d6b55feccc4124f5d2b4b74 (diff) | |
| parent | 368dd542bec7c31e14673b83d3342c35717d2920 (diff) | |
merge with viewer-release
Diffstat (limited to 'indra/newview/llviewerstatsrecorder.cpp')
| -rw-r--r-- | indra/newview/llviewerstatsrecorder.cpp | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/indra/newview/llviewerstatsrecorder.cpp b/indra/newview/llviewerstatsrecorder.cpp index 91e485d01b..61d0f02fc1 100644 --- a/indra/newview/llviewerstatsrecorder.cpp +++ b/indra/newview/llviewerstatsrecorder.cpp @@ -216,18 +216,21 @@ void LLViewerStatsRecorder::writeToLog( F32 interval ) << "Texture Fetch bps\t" << "\n"; - fwrite(data_msg.str().c_str(), 1, data_msg.str().size(), mObjectCacheFile ); + if (fwrite(data_msg.str().c_str(), 1, data_msg.str().size(), mObjectCacheFile ) != data_msg.str().size()) + { + llwarns << "Failed to write log file." << llendl; + } } else - { - llwarns << "Couldn't open " << STATS_FILE_NAME << " for logging." << llendl; + { + //llwarns << "Couldn't open " << STATS_FILE_NAME << " for logging." << llendl; return; } } - std::ostringstream data_msg; + std::ostringstream data_msg; - data_msg << getTimeSinceStart() + data_msg << getTimeSinceStart() << "\t " << mObjectCacheHitCount << "\t" << mObjectCacheMissFullCount << "\t" << mObjectCacheMissCrcCount @@ -247,9 +250,12 @@ void LLViewerStatsRecorder::writeToLog( F32 interval ) << "\t" << (mObjectTerseUpdatesSize * 8 / delta_time) << "\t" << (mObjectCacheMissResponsesSize * 8 / delta_time) << "\t" << (mTextureFetchSize * 8 / delta_time) - << "\n"; + << "\n"; - fwrite(data_msg.str().c_str(), 1, data_msg.str().size(), mObjectCacheFile ); + if (fwrite(data_msg.str().c_str(), 1, data_msg.str().size(), mObjectCacheFile ) != data_msg.str().size()) + { + llwarns << "Failed to write log file." << llendl; + } clearStats(); } |
