SL-19676 - more update and scene loading stats. Added texture and mesh
countmeow-7.2.2
parent
e8c1a18105
commit
90631fccef
|
|
@ -56,6 +56,7 @@
|
|||
#include "llviewermessage.h"
|
||||
#include "llviewerobjectlist.h"
|
||||
#include "llviewerregion.h"
|
||||
#include "llviewerstatsrecorder.h"
|
||||
#include "llviewertexturelist.h"
|
||||
#include "llvolume.h"
|
||||
#include "llvolumemgr.h"
|
||||
|
|
@ -4089,6 +4090,8 @@ void LLMeshRepository::notifyMeshLoaded(const LLVolumeParams& mesh_params, LLVol
|
|||
}
|
||||
|
||||
mLoadingMeshes[detail].erase(obj_iter);
|
||||
|
||||
LLViewerStatsRecorder::instance().meshLoaded();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2183,7 +2183,6 @@ S32 LLTextureFetchWorker::callbackHttpGet(LLCore::HttpResponse * response,
|
|||
LL_DEBUGS(LOG_TXT) << "HTTP RECEIVED: " << mID.asString() << " Bytes: " << data_size << LL_ENDL;
|
||||
if (data_size > 0)
|
||||
{
|
||||
LLViewerStatsRecorder::instance().textureFetch(data_size);
|
||||
// *TODO: set the formatted image data here directly to avoid the copy
|
||||
|
||||
// Hold on to body for later copy
|
||||
|
|
@ -2249,6 +2248,13 @@ S32 LLTextureFetchWorker::callbackHttpGet(LLCore::HttpResponse * response,
|
|||
mHaveAllData = TRUE;
|
||||
}
|
||||
mRequestedSize = data_size;
|
||||
|
||||
if (mHaveAllData)
|
||||
{
|
||||
LLViewerStatsRecorder::instance().textureFetch();
|
||||
}
|
||||
|
||||
// *TODO: set the formatted image data here directly to avoid the copy
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -80,7 +80,8 @@ void LLViewerStatsRecorder::clearStats()
|
|||
mObjectCacheUpdateReplacements = 0;
|
||||
mObjectUpdateFailures = 0;
|
||||
mObjectUpdateFailuresSize = 0;
|
||||
mTextureFetchSize = 0;
|
||||
mTextureFetchCount = 0;
|
||||
mMeshLoadedCount = 0;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -243,8 +244,9 @@ void LLViewerStatsRecorder::writeToLog( F32 interval )
|
|||
<< "Cache Update Adds,"
|
||||
<< "Cache Update Replacements,"
|
||||
<< "Update Failures,"
|
||||
<< "Texture Fetch bps,"
|
||||
<< "\n";
|
||||
<< "Texture Count,"
|
||||
<< "Mesh Load Count,"
|
||||
<< "\n";
|
||||
|
||||
data_size = col_headers.str().size();
|
||||
if (fwrite(col_headers.str().c_str(), 1, data_size, mStatsFile ) != data_size)
|
||||
|
|
@ -277,7 +279,8 @@ void LLViewerStatsRecorder::writeToLog( F32 interval )
|
|||
<< "," << mObjectCacheUpdateAdds
|
||||
<< "," << mObjectCacheUpdateReplacements
|
||||
<< "," << mObjectUpdateFailures
|
||||
<< "," << (mTextureFetchSize * 8 / delta_time)
|
||||
<< "," << mTextureFetchCount
|
||||
<< "," << mMeshLoadedCount
|
||||
<< "\n";
|
||||
|
||||
data_size = stats_data.str().size();
|
||||
|
|
@ -329,10 +332,14 @@ F32 LLViewerStatsRecorder::getTimeSinceStart()
|
|||
return (F32) (LLFrameTimer::getTotalSeconds() - mFileOpenTime);
|
||||
}
|
||||
|
||||
void LLViewerStatsRecorder::recordTextureFetch( S32 msg_size )
|
||||
void LLViewerStatsRecorder::recordTextureFetch()
|
||||
{
|
||||
mTextureFetchSize += msg_size;
|
||||
mTextureFetchCount += 1;
|
||||
}
|
||||
|
||||
void LLViewerStatsRecorder::recordMeshLoaded()
|
||||
{
|
||||
mMeshLoadedCount += 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -101,14 +101,22 @@ class LLViewerStatsRecorder : public LLSingleton<LLViewerStatsRecorder>
|
|||
}
|
||||
}
|
||||
|
||||
void textureFetch(S32 msg_size)
|
||||
void textureFetch()
|
||||
{
|
||||
if (mEnableStatsRecording)
|
||||
{
|
||||
recordTextureFetch(msg_size);
|
||||
recordTextureFetch();
|
||||
}
|
||||
}
|
||||
|
||||
void meshLoaded()
|
||||
{
|
||||
if (mEnableStatsRecording)
|
||||
{
|
||||
recordMeshLoaded();
|
||||
}
|
||||
}
|
||||
|
||||
void idle()
|
||||
{
|
||||
writeToLog(mInterval);
|
||||
|
|
@ -123,7 +131,8 @@ private:
|
|||
void recordObjectUpdateEvent(const EObjectUpdateType update_type);
|
||||
void recordCacheFullUpdate(LLViewerRegion::eCacheUpdateResult update_result);
|
||||
void recordRequestCacheMissesEvent(S32 count);
|
||||
void recordTextureFetch(S32 msg_size);
|
||||
void recordTextureFetch();
|
||||
void recordMeshLoaded();
|
||||
void writeToLog(F32 interval);
|
||||
void closeStatsFile();
|
||||
void makeStatsFileName();
|
||||
|
|
@ -156,7 +165,8 @@ private:
|
|||
S32 mObjectCacheUpdateReplacements;
|
||||
S32 mObjectUpdateFailures;
|
||||
S32 mObjectUpdateFailuresSize;
|
||||
S32 mTextureFetchSize;
|
||||
S32 mTextureFetchCount;
|
||||
S32 mMeshLoadedCount;
|
||||
|
||||
void clearStats();
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue