Catch up with LL regarding viewer stat recording.

This commit is contained in:
Shyotl
2013-02-14 17:45:10 -06:00
parent 2f5ab6f8e8
commit 51cbb8d6bd
15 changed files with 475 additions and 970 deletions

View File

@@ -39,88 +39,91 @@
class LLViewerStats : public LLSingleton<LLViewerStats>
{
public:
LLStat mKBitStat;
LLStat mLayersKBitStat;
LLStat mObjectKBitStat;
LLStat mAssetKBitStat;
LLStat mTextureKBitStat;
LLStat mVFSPendingOperations;
LLStat mObjectsDrawnStat;
LLStat mObjectsCulledStat;
LLStat mObjectsTestedStat;
LLStat mObjectsComparedStat;
LLStat mObjectsOccludedStat;
LLStat mFPSStat;
LLStat mPacketsInStat;
LLStat mPacketsLostStat;
LLStat mPacketsOutStat;
LLStat mPacketsLostPercentStat;
LLStat mTexturePacketsStat;
LLStat mActualInKBitStat; // From the packet ring (when faking a bad connection)
LLStat mActualOutKBitStat; // From the packet ring (when faking a bad connection)
LLStat mTrianglesDrawnStat;
LLStat mMallocStat;
LLStat mKBitStat,
mLayersKBitStat,
mObjectKBitStat,
mAssetKBitStat,
mTextureKBitStat,
mVFSPendingOperations,
mObjectsDrawnStat,
mObjectsCulledStat,
mObjectsTestedStat,
mObjectsComparedStat,
mObjectsOccludedStat,
mFPSStat,
mPacketsInStat,
mPacketsLostStat,
mPacketsOutStat,
mPacketsLostPercentStat,
mTexturePacketsStat,
mActualInKBitStat, // From the packet ring (when faking a bad connection)
mActualOutKBitStat, // From the packet ring (when faking a bad connection)
mTrianglesDrawnStat,
mMallocStat;
// Simulator stats
LLStat mSimTimeDilation;
LLStat mSimTimeDilation,
LLStat mSimFPS;
LLStat mSimPhysicsFPS;
LLStat mSimAgentUPS;
LLStat mSimScriptEPS;
mSimFPS,
mSimPhysicsFPS,
mSimAgentUPS,
mSimScriptEPS,
LLStat mSimFrameMsec;
LLStat mSimNetMsec;
LLStat mSimSimOtherMsec;
LLStat mSimSimPhysicsMsec;
mSimFrameMsec,
mSimNetMsec,
mSimSimOtherMsec,
mSimSimPhysicsMsec,
LLStat mSimSimPhysicsStepMsec;
LLStat mSimSimPhysicsShapeUpdateMsec;
LLStat mSimSimPhysicsOtherMsec;
mSimSimPhysicsStepMsec,
mSimSimPhysicsShapeUpdateMsec,
mSimSimPhysicsOtherMsec,
mSimSimAIStepMsec,
mSimSimSkippedSilhouetteSteps,
mSimSimPctSteppedCharacters,
LLStat mSimAgentMsec;
LLStat mSimImagesMsec;
LLStat mSimScriptMsec;
LLStat mSimSpareMsec;
LLStat mSimSleepMsec;
LLStat mSimPumpIOMsec;
mSimAgentMsec,
mSimImagesMsec,
mSimScriptMsec,
mSimSpareMsec,
mSimSleepMsec,
mSimPumpIOMsec,
LLStat mSimMainAgents;
LLStat mSimChildAgents;
LLStat mSimObjects;
LLStat mSimActiveObjects;
LLStat mSimActiveScripts;
mSimMainAgents,
mSimChildAgents,
mSimObjects,
mSimActiveObjects,
mSimActiveScripts,
mSimPctScriptsRun,
LLStat mSimInPPS;
LLStat mSimOutPPS;
LLStat mSimPendingDownloads;
LLStat mSimPendingUploads;
LLStat mSimPendingLocalUploads;
LLStat mSimTotalUnackedBytes;
mSimInPPS,
mSimOutPPS,
mSimPendingDownloads,
mSimPendingUploads,
mSimPendingLocalUploads,
mSimTotalUnackedBytes,
LLStat mPhysicsPinnedTasks;
LLStat mPhysicsLODTasks;
LLStat mPhysicsMemoryAllocated;
mPhysicsPinnedTasks,
mPhysicsLODTasks,
mPhysicsMemoryAllocated,
LLStat mSimPingStat;
mSimPingStat,
LLStat mNumImagesStat;
LLStat mNumRawImagesStat;
LLStat mGLTexMemStat;
LLStat mGLBoundMemStat;
LLStat mRawMemStat;
LLStat mFormattedMemStat;
mNumImagesStat,
mNumRawImagesStat,
mGLTexMemStat,
mGLBoundMemStat,
mRawMemStat,
mFormattedMemStat,
LLStat mNumObjectsStat;
LLStat mNumActiveObjectsStat;
LLStat mNumNewObjectsStat;
LLStat mNumSizeCulledStat;
LLStat mNumVisCulledStat;
mNumObjectsStat,
mNumActiveObjectsStat,
mNumNewObjectsStat,
mNumSizeCulledStat,
mNumVisCulledStat;
void resetStats();
public:
// If you change this, please also add a corresponding text label
// in statTypeToText in llviewerstats.cpp
// If you change this, please also add a corresponding text label in llviewerstats.cpp
enum EStatType
{
ST_VERSION = 0,
@@ -251,7 +254,7 @@ public:
inline F32 getStdDev() const
{
const F32 mean = getMean();
return (mCount == 0) ? 0.f : sqrt( mSumOfSquares/mCount - (mean * mean) );
return (mCount < 2) ? 0.f : sqrt(llmax(0.f,mSumOfSquares/mCount - (mean * mean)));
}
inline U32 getCount() const
@@ -291,14 +294,12 @@ private:
static const F32 SEND_STATS_PERIOD = 300.0f;
// The following are from (older?) statistics code found in appviewer.
void init_statistics();
void reset_statistics();
void output_statistics(void*);
void update_statistics(U32 frame_count);
void update_statistics();
void send_stats();
extern std::map<S32,LLFrameTimer> gDebugTimers;
extern std::map<S32,std::string> gDebugTimerLabel;
extern LLFrameTimer gTextureTimer;
extern U32 gTotalTextureBytes;
extern U32 gTotalObjectBytes;
extern U32 gTotalTextureBytesPerBoostLevel[] ;