diff options
author | Richard Linden <none@none> | 2013-06-21 11:00:47 -0700 |
---|---|---|
committer | Richard Linden <none@none> | 2013-06-21 11:00:47 -0700 |
commit | 090fa057b5ff17170d846473a2bc9ebc315c99d3 (patch) | |
tree | 781dff230ab8d1fc651e453cdd568df5aff8487a /indra/newview/llviewerstatsrecorder.cpp | |
parent | 5de2f0a8970244866dc8b511caa3c8626955264f (diff) | |
parent | a2a6bf20d71f923e9a5e43f71213fffbfea5a2a6 (diff) |
merge
Diffstat (limited to 'indra/newview/llviewerstatsrecorder.cpp')
-rwxr-xr-x | indra/newview/llviewerstatsrecorder.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/indra/newview/llviewerstatsrecorder.cpp b/indra/newview/llviewerstatsrecorder.cpp index acd8f6a29c..0e78bdc04c 100755 --- a/indra/newview/llviewerstatsrecorder.cpp +++ b/indra/newview/llviewerstatsrecorder.cpp @@ -166,6 +166,7 @@ void LLViewerStatsRecorder::recordRequestCacheMissesEvent(S32 count) void LLViewerStatsRecorder::writeToLog( F32 interval ) { + size_t data_size = 0; F64 delta_time = LLTimer::getTotalSeconds() - mLastSnapshotTime; S32 total_objects = mObjectCacheHitCount + mObjectCacheMissCrcCount + mObjectCacheMissFullCount + mObjectFullUpdates + mObjectTerseUpdates + mObjectCacheMissRequests + mObjectCacheMissResponses + mObjectCacheUpdateDupes + mObjectCacheUpdateChanges + mObjectCacheUpdateAdds + mObjectCacheUpdateReplacements + mObjectUpdateFailures; @@ -187,7 +188,6 @@ void LLViewerStatsRecorder::writeToLog( F32 interval ) << mObjectUpdateFailures << " update failures" << llendl; - U32 data_size; if (mObjectCacheFile == NULL) { mStartTime = LLTimer::getTotalSeconds(); @@ -224,15 +224,15 @@ void LLViewerStatsRecorder::writeToLog( F32 interval ) } } else - { + { //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 @@ -255,9 +255,9 @@ void LLViewerStatsRecorder::writeToLog( F32 interval ) << "\n"; data_size = data_msg.str().size(); - if (fwrite(data_msg.str().c_str(), 1, data_size, mObjectCacheFile ) != data_size) + if ( data_size != fwrite(data_msg.str().c_str(), 1, data_size, mObjectCacheFile )) { - llwarns << "failed to write full stats to " << STATS_FILE_NAME << llendl; + llwarns << "Unable to write complete column data to " << STATS_FILE_NAME << llendl; } clearStats(); |