Several LLStat variables migrated into the LLViewerStats class.
This commit is contained in:
@@ -39,7 +39,7 @@
|
|||||||
#ifndef LL_TEXTURE_H
|
#ifndef LL_TEXTURE_H
|
||||||
#define LL_TEXTURE_H
|
#define LL_TEXTURE_H
|
||||||
|
|
||||||
#include "llmemory.h"
|
#include "llrefcount.h"
|
||||||
class LLImageGL ;
|
class LLImageGL ;
|
||||||
class LLTexUnit ;
|
class LLTexUnit ;
|
||||||
class LLFontGL ;
|
class LLFontGL ;
|
||||||
|
|||||||
@@ -3604,14 +3604,29 @@ void LLAgent::setTeleportState(ETeleportState state)
|
|||||||
{
|
{
|
||||||
LLFloaterSnapshot::hide(0);
|
LLFloaterSnapshot::hide(0);
|
||||||
}
|
}
|
||||||
if (mTeleportState == TELEPORT_NONE)
|
|
||||||
{
|
switch (mTeleportState)
|
||||||
mbTeleportKeepsLookAt = false;
|
|
||||||
}
|
{
|
||||||
if ((mTeleportState == TELEPORT_MOVING))
|
case TELEPORT_NONE:
|
||||||
{
|
mbTeleportKeepsLookAt = false;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case TELEPORT_MOVING:
|
||||||
// We're outa here. Save "back" slurl.
|
// We're outa here. Save "back" slurl.
|
||||||
mTeleportSourceSLURL = getSLURL();
|
mTeleportSourceSLURL = getSLURL();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case TELEPORT_ARRIVING:
|
||||||
|
// First two position updates after a teleport tend to be weird
|
||||||
|
LLViewerStats::getInstance()->mAgentPositionSnaps.mCountOfNextUpdatesToIgnore = 2;
|
||||||
|
|
||||||
|
// Let the interested parties know we've teleported.
|
||||||
|
LLViewerParcelMgr::getInstance()->onTeleportFinished(false, getPositionGlobal());
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
// [RLVa:KB] - Alternate: Snowglobe-1.2.4 | Version: 1.23.4 | Checked: 2009-07-07 (RLVa-1.0.0d) | Added: RLVa-0.2.0b
|
// [RLVa:KB] - Alternate: Snowglobe-1.2.4 | Version: 1.23.4 | Checked: 2009-07-07 (RLVa-1.0.0d) | Added: RLVa-0.2.0b
|
||||||
if ( (rlv_handler_t::isEnabled()) && (TELEPORT_NONE == mTeleportState) )
|
if ( (rlv_handler_t::isEnabled()) && (TELEPORT_NONE == mTeleportState) )
|
||||||
|
|||||||
@@ -4179,7 +4179,7 @@ void LLAppViewer::idleNetwork()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
llpushcallstacks ;
|
llpushcallstacks ;
|
||||||
gObjectList.mNumNewObjectsStat.addValue(gObjectList.mNumNewObjects);
|
LLViewerStats::getInstance()->mNumNewObjectsStat.addValue(gObjectList.mNumNewObjects);
|
||||||
|
|
||||||
// Retransmit unacknowledged packets.
|
// Retransmit unacknowledged packets.
|
||||||
gXferManager->retransmitUnackedPackets();
|
gXferManager->retransmitUnackedPackets();
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ void LLFloaterStats::buildStats()
|
|||||||
|
|
||||||
LLStatView *render_statviewp = stat_viewp->addStatView("render stat view", "Render", "OpenDebugStatRender", rect);
|
LLStatView *render_statviewp = stat_viewp->addStatView("render stat view", "Render", "OpenDebugStatRender", rect);
|
||||||
|
|
||||||
stat_barp = render_statviewp->addStat("KTris Drawn", &(gPipeline.mTrianglesDrawnStat), "DebugStatModeKTrisDrawnFr");
|
stat_barp = render_statviewp->addStat("KTris Drawn", &(LLViewerStats::getInstance()->mTrianglesDrawnStat), "DebugStatModeKTrisDrawnFr");
|
||||||
stat_barp->setUnitLabel("/fr");
|
stat_barp->setUnitLabel("/fr");
|
||||||
stat_barp->mMinBar = 0.f;
|
stat_barp->mMinBar = 0.f;
|
||||||
stat_barp->mMaxBar = 500.f;
|
stat_barp->mMaxBar = 500.f;
|
||||||
@@ -116,7 +116,7 @@ void LLFloaterStats::buildStats()
|
|||||||
stat_barp->mPrecision = 1;
|
stat_barp->mPrecision = 1;
|
||||||
stat_barp->mPerSec = FALSE;
|
stat_barp->mPerSec = FALSE;
|
||||||
|
|
||||||
stat_barp = render_statviewp->addStat("KTris Drawn", &(gPipeline.mTrianglesDrawnStat), "DebugStatModeKTrisDrawnSec");
|
stat_barp = render_statviewp->addStat("KTris Drawn", &(LLViewerStats::getInstance()->mTrianglesDrawnStat), "DebugStatModeKTrisDrawnSec");
|
||||||
stat_barp->setUnitLabel("/sec");
|
stat_barp->setUnitLabel("/sec");
|
||||||
stat_barp->mMinBar = 0.f;
|
stat_barp->mMinBar = 0.f;
|
||||||
stat_barp->mMaxBar = 3000.f;
|
stat_barp->mMaxBar = 3000.f;
|
||||||
@@ -124,14 +124,14 @@ void LLFloaterStats::buildStats()
|
|||||||
stat_barp->mLabelSpacing = 1000.f;
|
stat_barp->mLabelSpacing = 1000.f;
|
||||||
stat_barp->mPrecision = 1;
|
stat_barp->mPrecision = 1;
|
||||||
|
|
||||||
stat_barp = render_statviewp->addStat("Total Objs", &(gObjectList.mNumObjectsStat), "DebugStatModeTotalObjs");
|
stat_barp = render_statviewp->addStat("Total Objs", &(LLViewerStats::getInstance()->mNumObjectsStat), "DebugStatModeTotalObjs");
|
||||||
stat_barp->mMinBar = 0.f;
|
stat_barp->mMinBar = 0.f;
|
||||||
stat_barp->mMaxBar = 10000.f;
|
stat_barp->mMaxBar = 10000.f;
|
||||||
stat_barp->mTickSpacing = 2500.f;
|
stat_barp->mTickSpacing = 2500.f;
|
||||||
stat_barp->mLabelSpacing = 5000.f;
|
stat_barp->mLabelSpacing = 5000.f;
|
||||||
stat_barp->mPerSec = FALSE;
|
stat_barp->mPerSec = FALSE;
|
||||||
|
|
||||||
stat_barp = render_statviewp->addStat("New Objs", &(gObjectList.mNumNewObjectsStat), "DebugStatModeNewObjs");
|
stat_barp = render_statviewp->addStat("New Objs", &(LLViewerStats::getInstance()->mNumNewObjectsStat), "DebugStatModeNewObjs");
|
||||||
stat_barp->setLabel("New Objs");
|
stat_barp->setLabel("New Objs");
|
||||||
stat_barp->setUnitLabel("/sec");
|
stat_barp->setUnitLabel("/sec");
|
||||||
stat_barp->mMinBar = 0.f;
|
stat_barp->mMinBar = 0.f;
|
||||||
@@ -144,7 +144,7 @@ void LLFloaterStats::buildStats()
|
|||||||
// Texture statistics
|
// Texture statistics
|
||||||
LLStatView *texture_statviewp = render_statviewp->addStatView("texture stat view", "Texture", "OpenDebugStatTexture", rect);
|
LLStatView *texture_statviewp = render_statviewp->addStatView("texture stat view", "Texture", "OpenDebugStatTexture", rect);
|
||||||
|
|
||||||
stat_barp = texture_statviewp->addStat("Count", &(gTextureList.sNumImagesStat), "DebugStatModeTextureCount");
|
stat_barp = texture_statviewp->addStat("Count", &(LLViewerStats::getInstance()->mNumImagesStat), "DebugStatModeTextureCount");
|
||||||
stat_barp->setUnitLabel("");
|
stat_barp->setUnitLabel("");
|
||||||
stat_barp->mMinBar = 0.f;
|
stat_barp->mMinBar = 0.f;
|
||||||
stat_barp->mMaxBar = 8000.f;
|
stat_barp->mMaxBar = 8000.f;
|
||||||
@@ -152,7 +152,7 @@ void LLFloaterStats::buildStats()
|
|||||||
stat_barp->mLabelSpacing = 4000.f;
|
stat_barp->mLabelSpacing = 4000.f;
|
||||||
stat_barp->mPerSec = FALSE;
|
stat_barp->mPerSec = FALSE;
|
||||||
|
|
||||||
stat_barp = texture_statviewp->addStat("Raw Count", &(gTextureList.sNumRawImagesStat), "DebugStatModeRawCount");
|
stat_barp = texture_statviewp->addStat("Raw Count", &(LLViewerStats::getInstance()->mNumRawImagesStat), "DebugStatModeRawCount");
|
||||||
stat_barp->setUnitLabel("");
|
stat_barp->setUnitLabel("");
|
||||||
stat_barp->mMinBar = 0.f;
|
stat_barp->mMinBar = 0.f;
|
||||||
stat_barp->mMaxBar = 8000.f;
|
stat_barp->mMaxBar = 8000.f;
|
||||||
@@ -160,7 +160,7 @@ void LLFloaterStats::buildStats()
|
|||||||
stat_barp->mLabelSpacing = 4000.f;
|
stat_barp->mLabelSpacing = 4000.f;
|
||||||
stat_barp->mPerSec = FALSE;
|
stat_barp->mPerSec = FALSE;
|
||||||
|
|
||||||
stat_barp = texture_statviewp->addStat("GL Mem", &(gTextureList.sGLTexMemStat), "DebugStatModeGLMem");
|
stat_barp = texture_statviewp->addStat("GL Mem", &(LLViewerStats::getInstance()->mGLTexMemStat), "DebugStatModeGLMem");
|
||||||
stat_barp->setUnitLabel("");
|
stat_barp->setUnitLabel("");
|
||||||
stat_barp->mMinBar = 0.f;
|
stat_barp->mMinBar = 0.f;
|
||||||
stat_barp->mMaxBar = 400.f;
|
stat_barp->mMaxBar = 400.f;
|
||||||
@@ -169,7 +169,7 @@ void LLFloaterStats::buildStats()
|
|||||||
stat_barp->mPrecision = 1;
|
stat_barp->mPrecision = 1;
|
||||||
stat_barp->mPerSec = FALSE;
|
stat_barp->mPerSec = FALSE;
|
||||||
|
|
||||||
stat_barp = texture_statviewp->addStat("Formatted Mem", &(gTextureList.sFormattedMemStat), "DebugStatModeFormattedMem");
|
stat_barp = texture_statviewp->addStat("Formatted Mem", &(LLViewerStats::getInstance()->mFormattedMemStat), "DebugStatModeFormattedMem");
|
||||||
stat_barp->setUnitLabel("");
|
stat_barp->setUnitLabel("");
|
||||||
stat_barp->mMinBar = 0.f;
|
stat_barp->mMinBar = 0.f;
|
||||||
stat_barp->mMaxBar = 400.f;
|
stat_barp->mMaxBar = 400.f;
|
||||||
@@ -178,7 +178,7 @@ void LLFloaterStats::buildStats()
|
|||||||
stat_barp->mPrecision = 1;
|
stat_barp->mPrecision = 1;
|
||||||
stat_barp->mPerSec = FALSE;
|
stat_barp->mPerSec = FALSE;
|
||||||
|
|
||||||
stat_barp = texture_statviewp->addStat("Raw Mem", &(gTextureList.sRawMemStat), "DebugStatModeRawMem");
|
stat_barp = texture_statviewp->addStat("Raw Mem", &(LLViewerStats::getInstance()->mRawMemStat), "DebugStatModeRawMem");
|
||||||
stat_barp->setUnitLabel("");
|
stat_barp->setUnitLabel("");
|
||||||
stat_barp->mMinBar = 0.f;
|
stat_barp->mMinBar = 0.f;
|
||||||
stat_barp->mMaxBar = 400.f;
|
stat_barp->mMaxBar = 400.f;
|
||||||
@@ -187,7 +187,7 @@ void LLFloaterStats::buildStats()
|
|||||||
stat_barp->mPrecision = 1;
|
stat_barp->mPrecision = 1;
|
||||||
stat_barp->mPerSec = FALSE;
|
stat_barp->mPerSec = FALSE;
|
||||||
|
|
||||||
stat_barp = texture_statviewp->addStat("Bound Mem", &(gTextureList.sGLBoundMemStat), "DebugStatModeBoundMem");
|
stat_barp = texture_statviewp->addStat("Bound Mem", &(LLViewerStats::getInstance()->mGLBoundMemStat), "DebugStatModeBoundMem");
|
||||||
stat_barp->setUnitLabel("");
|
stat_barp->setUnitLabel("");
|
||||||
stat_barp->mMinBar = 0.f;
|
stat_barp->mMinBar = 0.f;
|
||||||
stat_barp->mMaxBar = 400.f;
|
stat_barp->mMaxBar = 400.f;
|
||||||
|
|||||||
@@ -37,7 +37,8 @@
|
|||||||
#include "lleditmenuhandler.h"
|
#include "lleditmenuhandler.h"
|
||||||
#include "llundo.h"
|
#include "llundo.h"
|
||||||
#include "lluuid.h"
|
#include "lluuid.h"
|
||||||
#include "llmemory.h"
|
#include "llpointer.h"
|
||||||
|
#include "llsafehandle.h"
|
||||||
#include "llsaleinfo.h"
|
#include "llsaleinfo.h"
|
||||||
#include "llcategory.h"
|
#include "llcategory.h"
|
||||||
#include "v3dmath.h"
|
#include "v3dmath.h"
|
||||||
|
|||||||
@@ -79,6 +79,7 @@
|
|||||||
#include "llviewerparceloverlay.h"
|
#include "llviewerparceloverlay.h"
|
||||||
#include "llviewerpartsource.h"
|
#include "llviewerpartsource.h"
|
||||||
#include "llviewerregion.h"
|
#include "llviewerregion.h"
|
||||||
|
#include "llviewerstats.h"
|
||||||
#include "llviewertextureanim.h"
|
#include "llviewertextureanim.h"
|
||||||
#include "llviewerwindow.h" // For getSpinAxis
|
#include "llviewerwindow.h" // For getSpinAxis
|
||||||
#include "llvoavatar.h"
|
#include "llvoavatar.h"
|
||||||
@@ -1979,6 +1980,12 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
|
|||||||
|
|
||||||
avatar->clampAttachmentPositions();
|
avatar->clampAttachmentPositions();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If we're snapping the position by more than 0.5m, update LLViewerStats::mAgentPositionSnaps
|
||||||
|
if ( isAvatar() && gAgent.getAvatarObject() == this && (mag_sqr > 0.25f) )
|
||||||
|
{
|
||||||
|
LLViewerStats::getInstance()->mAgentPositionSnaps.push( diff.length() );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (new_rot != mLastRot
|
if (new_rot != mLastRot
|
||||||
|
|||||||
@@ -1026,10 +1026,10 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world)
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
mNumObjectsStat.addValue((S32) mObjects.size() - mNumDeadObjects);
|
LLViewerStats::getInstance()->mNumObjectsStat.addValue((S32) mObjects.size() - mNumDeadObjects);
|
||||||
mNumActiveObjectsStat.addValue(num_active_objects);
|
LLViewerStats::getInstance()->mNumActiveObjectsStat.addValue(num_active_objects);
|
||||||
mNumSizeCulledStat.addValue(mNumSizeCulled);
|
LLViewerStats::getInstance()->mNumSizeCulledStat.addValue(mNumSizeCulled);
|
||||||
mNumVisCulledStat.addValue(mNumVisCulled);
|
LLViewerStats::getInstance()->mNumVisCulledStat.addValue(mNumVisCulled);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if MESH_ENABLED
|
#if MESH_ENABLED
|
||||||
|
|||||||
@@ -174,17 +174,6 @@ public:
|
|||||||
|
|
||||||
U32 mCurBin; // Current bin we're working on...
|
U32 mCurBin; // Current bin we're working on...
|
||||||
|
|
||||||
//////////////////////
|
|
||||||
//
|
|
||||||
// Statistics data
|
|
||||||
//
|
|
||||||
//
|
|
||||||
LLStat mNumObjectsStat;
|
|
||||||
LLStat mNumActiveObjectsStat;
|
|
||||||
LLStat mNumNewObjectsStat;
|
|
||||||
LLStat mNumSizeCulledStat;
|
|
||||||
LLStat mNumVisCulledStat;
|
|
||||||
|
|
||||||
S32 mNumNewObjects;
|
S32 mNumNewObjects;
|
||||||
|
|
||||||
S32 mNumSizeCulled;
|
S32 mNumSizeCulled;
|
||||||
|
|||||||
@@ -60,6 +60,7 @@
|
|||||||
#include "llworld.h"
|
#include "llworld.h"
|
||||||
#include "llfeaturemanager.h"
|
#include "llfeaturemanager.h"
|
||||||
#include "llviewernetwork.h"
|
#include "llviewernetwork.h"
|
||||||
|
#include "llmeshrepository.h" //for LLMeshRepository::sBytesReceived
|
||||||
#if LL_LCD_COMPILE
|
#if LL_LCD_COMPILE
|
||||||
#include "lllcd.h"
|
#include "lllcd.h"
|
||||||
#endif
|
#endif
|
||||||
@@ -206,9 +207,72 @@ const StatAttributes STAT_INFO[LLViewerStats::ST_COUNT] =
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
LLViewerStats::LLViewerStats()
|
LLViewerStats::LLViewerStats() :
|
||||||
: mPacketsLostPercentStat(64),
|
mKBitStat("kbitstat"),
|
||||||
mLastTimeDiff(0.0)
|
mLayersKBitStat("layerskbitstat"),
|
||||||
|
mObjectKBitStat("objectkbitstat"),
|
||||||
|
mAssetKBitStat("assetkbitstat"),
|
||||||
|
mTextureKBitStat("texturekbitstat"),
|
||||||
|
mVFSPendingOperations("vfspendingoperations"),
|
||||||
|
mObjectsDrawnStat("objectsdrawnstat"),
|
||||||
|
mObjectsCulledStat("objectsculledstat"),
|
||||||
|
mObjectsTestedStat("objectstestedstat"),
|
||||||
|
mObjectsComparedStat("objectscomparedstat"),
|
||||||
|
mObjectsOccludedStat("objectsoccludedstat"),
|
||||||
|
mFPSStat("fpsstat"),
|
||||||
|
mPacketsInStat("packetsinstat"),
|
||||||
|
mPacketsLostStat("packetsloststat"),
|
||||||
|
mPacketsOutStat("packetsoutstat"),
|
||||||
|
mPacketsLostPercentStat("packetslostpercentstat", 64),
|
||||||
|
mTexturePacketsStat("texturepacketsstat"),
|
||||||
|
mActualInKBitStat("actualinkbitstat"),
|
||||||
|
mActualOutKBitStat("actualoutkbitstat"),
|
||||||
|
mTrianglesDrawnStat("trianglesdrawnstat"),
|
||||||
|
mSimTimeDilation("simtimedilation"),
|
||||||
|
mSimFPS("simfps"),
|
||||||
|
mSimPhysicsFPS("simphysicsfps"),
|
||||||
|
mSimAgentUPS("simagentups"),
|
||||||
|
mSimScriptEPS("simscripteps"),
|
||||||
|
mSimFrameMsec("simframemsec"),
|
||||||
|
mSimNetMsec("simnetmsec"),
|
||||||
|
mSimSimOtherMsec("simsimothermsec"),
|
||||||
|
mSimSimPhysicsMsec("simsimphysicsmsec"),
|
||||||
|
mSimSimPhysicsStepMsec("simsimphysicsstepmsec"),
|
||||||
|
mSimSimPhysicsShapeUpdateMsec("simsimphysicsshapeupdatemsec"),
|
||||||
|
mSimSimPhysicsOtherMsec("simsimphysicsothermsec"),
|
||||||
|
mSimAgentMsec("simagentmsec"),
|
||||||
|
mSimImagesMsec("simimagesmsec"),
|
||||||
|
mSimScriptMsec("simscriptmsec"),
|
||||||
|
mSimSpareMsec("simsparemsec"),
|
||||||
|
mSimSleepMsec("simsleepmsec"),
|
||||||
|
mSimPumpIOMsec("simpumpiomsec"),
|
||||||
|
mSimMainAgents("simmainagents"),
|
||||||
|
mSimChildAgents("simchildagents"),
|
||||||
|
mSimObjects("simobjects"),
|
||||||
|
mSimActiveObjects("simactiveobjects"),
|
||||||
|
mSimActiveScripts("simactivescripts"),
|
||||||
|
mSimInPPS("siminpps"),
|
||||||
|
mSimOutPPS("simoutpps"),
|
||||||
|
mSimPendingDownloads("simpendingdownloads"),
|
||||||
|
mSimPendingUploads("simpendinguploads"),
|
||||||
|
mSimPendingLocalUploads("simpendinglocaluploads"),
|
||||||
|
mSimTotalUnackedBytes("simtotalunackedbytes"),
|
||||||
|
mPhysicsPinnedTasks("physicspinnedtasks"),
|
||||||
|
mPhysicsLODTasks("physicslodtasks"),
|
||||||
|
mPhysicsMemoryAllocated("physicsmemoryallocated"),
|
||||||
|
mSimPingStat("simpingstat"),
|
||||||
|
mNumImagesStat("numimagesstat", 32, TRUE),
|
||||||
|
mNumRawImagesStat("numrawimagesstat", 32, TRUE),
|
||||||
|
mGLTexMemStat("gltexmemstat", 32, TRUE),
|
||||||
|
mGLBoundMemStat("glboundmemstat", 32, TRUE),
|
||||||
|
mRawMemStat("rawmemstat", 32, TRUE),
|
||||||
|
mFormattedMemStat("formattedmemstat", 32, TRUE),
|
||||||
|
mNumObjectsStat("numobjectsstat"),
|
||||||
|
mNumActiveObjectsStat("numactiveobjectsstat"),
|
||||||
|
mNumNewObjectsStat("numnewobjectsstat"),
|
||||||
|
mNumSizeCulledStat("numsizeculledstat"),
|
||||||
|
mNumVisCulledStat("numvisculledstat"),
|
||||||
|
mLastTimeDiff(0.0)
|
||||||
{
|
{
|
||||||
for (S32 i = 0; i < ST_COUNT; i++)
|
for (S32 i = 0; i < ST_COUNT; i++)
|
||||||
{
|
{
|
||||||
@@ -219,6 +283,8 @@ LLViewerStats::LLViewerStats()
|
|||||||
{
|
{
|
||||||
mStats[ST_HAS_BAD_TIMER] = 1.0;
|
mStats[ST_HAS_BAD_TIMER] = 1.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mAgentPositionSnaps.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
LLViewerStats::~LLViewerStats()
|
LLViewerStats::~LLViewerStats()
|
||||||
@@ -238,6 +304,8 @@ void LLViewerStats::resetStats()
|
|||||||
LLViewerStats::getInstance()->mPacketsOutStat.reset();
|
LLViewerStats::getInstance()->mPacketsOutStat.reset();
|
||||||
LLViewerStats::getInstance()->mFPSStat.reset();
|
LLViewerStats::getInstance()->mFPSStat.reset();
|
||||||
LLViewerStats::getInstance()->mTexturePacketsStat.reset();
|
LLViewerStats::getInstance()->mTexturePacketsStat.reset();
|
||||||
|
|
||||||
|
LLViewerStats::getInstance()->mAgentPositionSnaps.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -332,6 +400,10 @@ void LLViewerStats::addToMessage(LLSD &body) const
|
|||||||
<< llendl;
|
<< llendl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
body["AgentPositionSnaps"] = mAgentPositionSnaps.getData();
|
||||||
|
llinfos << "STAT: AgentPositionSnaps: Mean = " << mAgentPositionSnaps.getMean() << "; StdDev = " << mAgentPositionSnaps.getStdDev()
|
||||||
|
<< "; Count = " << mAgentPositionSnaps.getCount() << llendl;
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
@@ -532,7 +604,7 @@ void update_statistics(U32 frame_count)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
LLViewerStats::getInstance()->setStat(LLViewerStats::ST_ENABLE_VBO, (F64)gSavedSettings.getBOOL("RenderVBOEnable"));
|
LLViewerStats::getInstance()->setStat(LLViewerStats::ST_ENABLE_VBO, (F64)gSavedSettings.getBOOL("RenderVBOEnable"));
|
||||||
//LLViewerStats::getInstance()->setStat(LLViewerStats::ST_LIGHTING_DETAIL, (F64)gSavedSettings.getS32("RenderLightingDetail"));
|
LLViewerStats::getInstance()->setStat(LLViewerStats::ST_LIGHTING_DETAIL, (F64)gPipeline.getLightingDetail());
|
||||||
LLViewerStats::getInstance()->setStat(LLViewerStats::ST_DRAW_DIST, (F64)gSavedSettings.getF32("RenderFarClip"));
|
LLViewerStats::getInstance()->setStat(LLViewerStats::ST_DRAW_DIST, (F64)gSavedSettings.getF32("RenderFarClip"));
|
||||||
LLViewerStats::getInstance()->setStat(LLViewerStats::ST_CHAT_BUBBLES, (F64)gSavedSettings.getBOOL("UseChatBubbles"));
|
LLViewerStats::getInstance()->setStat(LLViewerStats::ST_CHAT_BUBBLES, (F64)gSavedSettings.getBOOL("UseChatBubbles"));
|
||||||
#if 0 // 1.9.2
|
#if 0 // 1.9.2
|
||||||
@@ -599,7 +671,7 @@ void update_statistics(U32 frame_count)
|
|||||||
|
|
||||||
// Only update texture stats ones per second so that they are less noisy
|
// Only update texture stats ones per second so that they are less noisy
|
||||||
{
|
{
|
||||||
static const F32 texture_stats_freq = 1.f;
|
static const F32 texture_stats_freq = 10.f;
|
||||||
static LLFrameTimer texture_stats_timer;
|
static LLFrameTimer texture_stats_timer;
|
||||||
if (texture_stats_timer.getElapsedTimeF32() >= texture_stats_freq)
|
if (texture_stats_timer.getElapsedTimeF32() >= texture_stats_freq)
|
||||||
{
|
{
|
||||||
@@ -714,9 +786,11 @@ void send_stats()
|
|||||||
system["ram"] = (S32) gSysMemory.getPhysicalMemoryKB();
|
system["ram"] = (S32) gSysMemory.getPhysicalMemoryKB();
|
||||||
system["os"] = LLAppViewer::instance()->getOSInfo().getOSStringSimple();
|
system["os"] = LLAppViewer::instance()->getOSInfo().getOSStringSimple();
|
||||||
system["cpu"] = gSysCPU.getCPUString();
|
system["cpu"] = gSysCPU.getCPUString();
|
||||||
|
unsigned char MACAddress[MAC_ADDRESS_BYTES];
|
||||||
|
LLUUID::getNodeID(MACAddress);
|
||||||
std::string macAddressString = llformat("%02x-%02x-%02x-%02x-%02x-%02x",
|
std::string macAddressString = llformat("%02x-%02x-%02x-%02x-%02x-%02x",
|
||||||
gMACAddress[0],gMACAddress[1],gMACAddress[2],
|
MACAddress[0],MACAddress[1],MACAddress[2],
|
||||||
gMACAddress[3],gMACAddress[4],gMACAddress[5]);
|
MACAddress[3],MACAddress[4],MACAddress[5]);
|
||||||
system["mac_address"] = macAddressString;
|
system["mac_address"] = macAddressString;
|
||||||
system["serial_number"] = LLAppViewer::instance()->getSerialNumber();
|
system["serial_number"] = LLAppViewer::instance()->getSerialNumber();
|
||||||
std::string gpu_desc = llformat(
|
std::string gpu_desc = llformat(
|
||||||
@@ -735,6 +809,7 @@ void send_stats()
|
|||||||
download["world_kbytes"] = gTotalWorldBytes / 1024.0;
|
download["world_kbytes"] = gTotalWorldBytes / 1024.0;
|
||||||
download["object_kbytes"] = gTotalObjectBytes / 1024.0;
|
download["object_kbytes"] = gTotalObjectBytes / 1024.0;
|
||||||
download["texture_kbytes"] = gTotalTextureBytes / 1024.0;
|
download["texture_kbytes"] = gTotalTextureBytes / 1024.0;
|
||||||
|
download["mesh_kbytes"] = LLMeshRepository::sBytesReceived/1024.0;
|
||||||
|
|
||||||
LLSD &in = body["stats"]["net"]["in"];
|
LLSD &in = body["stats"]["net"]["in"];
|
||||||
|
|
||||||
@@ -770,13 +845,15 @@ void send_stats()
|
|||||||
// Screen size so the UI team can figure out how big the widgets
|
// Screen size so the UI team can figure out how big the widgets
|
||||||
// appear and use a "typical" size for end user tests.
|
// appear and use a "typical" size for end user tests.
|
||||||
|
|
||||||
S32 window_width = gViewerWindow->getWindowDisplayWidth();
|
S32 window_width = gViewerWindow->getWindowWidthRaw();
|
||||||
S32 window_height = gViewerWindow->getWindowDisplayHeight();
|
S32 window_height = gViewerWindow->getWindowHeightRaw();
|
||||||
S32 window_size = (window_width * window_height) / 1024;
|
S32 window_size = (window_width * window_height) / 1024;
|
||||||
misc["string_1"] = llformat("%d", window_size);
|
misc["string_1"] = llformat("%d", window_size);
|
||||||
// misc["string_2"] =
|
if (gDebugTimers.find(0) != gDebugTimers.end() && gFrameTimeSeconds > 0)
|
||||||
// misc["int_1"] = LLFloaterDirectory::sOldSearchCount; // Steve: 1.18.6
|
{
|
||||||
// misc["int_2"] = LLFloaterDirectory::sNewSearchCount; // Steve: 1.18.6
|
misc["string_2"] = llformat("Texture Time: %.2f, Total Time: %.2f", gDebugTimers[0].getElapsedTimeF32(), gFrameTimeSeconds);
|
||||||
|
}
|
||||||
|
|
||||||
// misc["int_1"] = LLSD::Integer(gSavedSettings.getU32("RenderQualityPerformance")); // Steve: 1.21
|
// misc["int_1"] = LLSD::Integer(gSavedSettings.getU32("RenderQualityPerformance")); // Steve: 1.21
|
||||||
// misc["int_2"] = LLSD::Integer(gFrameStalls); // Steve: 1.21
|
// misc["int_2"] = LLSD::Integer(gFrameStalls); // Steve: 1.21
|
||||||
|
|
||||||
@@ -787,6 +864,11 @@ void send_stats()
|
|||||||
|
|
||||||
llinfos << "Misc Stats: int_1: " << misc["int_1"] << " int_2: " << misc["int_2"] << llendl;
|
llinfos << "Misc Stats: int_1: " << misc["int_1"] << " int_2: " << misc["int_2"] << llendl;
|
||||||
llinfos << "Misc Stats: string_1: " << misc["string_1"] << " string_2: " << misc["string_2"] << llendl;
|
llinfos << "Misc Stats: string_1: " << misc["string_1"] << " string_2: " << misc["string_2"] << llendl;
|
||||||
|
|
||||||
|
body["DisplayNamesEnabled"] = gSavedSettings.getS32("PhoenixNameSystem") > 0;
|
||||||
|
body["DisplayNamesShowUsername"] = gSavedSettings.getS32("PhoenixNameSystem") == 1;
|
||||||
|
|
||||||
|
body["MinimalSkin"] = false;
|
||||||
|
|
||||||
LLViewerStats::getInstance()->addToMessage(body);
|
LLViewerStats::getInstance()->addToMessage(body);
|
||||||
LLHTTPClient::post(url, body, new ViewerStatsResponder());
|
LLHTTPClient::post(url, body, new ViewerStatsResponder());
|
||||||
|
|||||||
@@ -58,6 +58,7 @@ public:
|
|||||||
LLStat mTexturePacketsStat;
|
LLStat mTexturePacketsStat;
|
||||||
LLStat mActualInKBitStat; // From the packet ring (when faking a bad connection)
|
LLStat mActualInKBitStat; // From the packet ring (when faking a bad connection)
|
||||||
LLStat mActualOutKBitStat; // From the packet ring (when faking a bad connection)
|
LLStat mActualOutKBitStat; // From the packet ring (when faking a bad connection)
|
||||||
|
LLStat mTrianglesDrawnStat;
|
||||||
|
|
||||||
// Simulator stats
|
// Simulator stats
|
||||||
LLStat mSimTimeDilation;
|
LLStat mSimTimeDilation;
|
||||||
@@ -99,15 +100,22 @@ public:
|
|||||||
LLStat mPhysicsPinnedTasks;
|
LLStat mPhysicsPinnedTasks;
|
||||||
LLStat mPhysicsLODTasks;
|
LLStat mPhysicsLODTasks;
|
||||||
LLStat mPhysicsMemoryAllocated;
|
LLStat mPhysicsMemoryAllocated;
|
||||||
/*
|
|
||||||
LLStat mSimCPUUsageStat;
|
|
||||||
LLStat mSimMemTotalStat;
|
|
||||||
LLStat mSimMemRSSStat;
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
LLStat mSimPingStat;
|
LLStat mSimPingStat;
|
||||||
|
|
||||||
|
LLStat mNumImagesStat;
|
||||||
|
LLStat mNumRawImagesStat;
|
||||||
|
LLStat mGLTexMemStat;
|
||||||
|
LLStat mGLBoundMemStat;
|
||||||
|
LLStat mRawMemStat;
|
||||||
|
LLStat mFormattedMemStat;
|
||||||
|
|
||||||
|
LLStat mNumObjectsStat;
|
||||||
|
LLStat mNumActiveObjectsStat;
|
||||||
|
LLStat mNumNewObjectsStat;
|
||||||
|
LLStat mNumSizeCulledStat;
|
||||||
|
LLStat mNumVisCulledStat;
|
||||||
|
|
||||||
void resetStats();
|
void resetStats();
|
||||||
public:
|
public:
|
||||||
// If you change this, please also add a corresponding text label
|
// If you change this, please also add a corresponding text label
|
||||||
@@ -190,6 +198,90 @@ public:
|
|||||||
|
|
||||||
void addToMessage(LLSD &body) const;
|
void addToMessage(LLSD &body) const;
|
||||||
|
|
||||||
|
struct StatsAccumulator
|
||||||
|
{
|
||||||
|
S32 mCount;
|
||||||
|
F32 mSum;
|
||||||
|
F32 mSumOfSquares;
|
||||||
|
F32 mMinValue;
|
||||||
|
F32 mMaxValue;
|
||||||
|
U32 mCountOfNextUpdatesToIgnore;
|
||||||
|
|
||||||
|
inline StatsAccumulator()
|
||||||
|
{
|
||||||
|
reset();
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void push( F32 val )
|
||||||
|
{
|
||||||
|
if ( mCountOfNextUpdatesToIgnore > 0 )
|
||||||
|
{
|
||||||
|
mCountOfNextUpdatesToIgnore--;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
mCount++;
|
||||||
|
mSum += val;
|
||||||
|
mSumOfSquares += val * val;
|
||||||
|
if (mCount == 1 || val > mMaxValue)
|
||||||
|
{
|
||||||
|
mMaxValue = val;
|
||||||
|
}
|
||||||
|
if (mCount == 1 || val < mMinValue)
|
||||||
|
{
|
||||||
|
mMinValue = val;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
inline F32 getMean() const
|
||||||
|
{
|
||||||
|
return (mCount == 0) ? 0.f : ((F32)mSum)/mCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline F32 getMinValue() const
|
||||||
|
{
|
||||||
|
return mMinValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline F32 getMaxValue() const
|
||||||
|
{
|
||||||
|
return mMaxValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline F32 getStdDev() const
|
||||||
|
{
|
||||||
|
const F32 mean = getMean();
|
||||||
|
return (mCount == 0) ? 0.f : sqrt( mSumOfSquares/mCount - (mean * mean) );
|
||||||
|
}
|
||||||
|
|
||||||
|
inline U32 getCount() const
|
||||||
|
{
|
||||||
|
return mCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void reset()
|
||||||
|
{
|
||||||
|
mCount = 0;
|
||||||
|
mSum = mSumOfSquares = 0.f;
|
||||||
|
mMinValue = 0.0f;
|
||||||
|
mMaxValue = 0.0f;
|
||||||
|
mCountOfNextUpdatesToIgnore = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline LLSD getData() const
|
||||||
|
{
|
||||||
|
LLSD data;
|
||||||
|
data["mean"] = getMean();
|
||||||
|
data["std_dev"] = getStdDev();
|
||||||
|
data["count"] = (S32)mCount;
|
||||||
|
data["min"] = getMinValue();
|
||||||
|
data["max"] = getMaxValue();
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
StatsAccumulator mAgentPositionSnaps;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
F64 mStats[ST_COUNT];
|
F64 mStats[ST_COUNT];
|
||||||
|
|
||||||
|
|||||||
@@ -72,12 +72,6 @@ void (*LLViewerTextureList::sUUIDCallback)(void **, const LLUUID&) = NULL;
|
|||||||
U32 LLViewerTextureList::sTextureBits = 0;
|
U32 LLViewerTextureList::sTextureBits = 0;
|
||||||
U32 LLViewerTextureList::sTexturePackets = 0;
|
U32 LLViewerTextureList::sTexturePackets = 0;
|
||||||
S32 LLViewerTextureList::sNumImages = 0;
|
S32 LLViewerTextureList::sNumImages = 0;
|
||||||
LLStat LLViewerTextureList::sNumImagesStat(32, TRUE);
|
|
||||||
LLStat LLViewerTextureList::sNumRawImagesStat(32, TRUE);
|
|
||||||
LLStat LLViewerTextureList::sGLTexMemStat(32, TRUE);
|
|
||||||
LLStat LLViewerTextureList::sGLBoundMemStat(32, TRUE);
|
|
||||||
LLStat LLViewerTextureList::sRawMemStat(32, TRUE);
|
|
||||||
LLStat LLViewerTextureList::sFormattedMemStat(32, TRUE);
|
|
||||||
|
|
||||||
LLViewerTextureList gTextureList;
|
LLViewerTextureList gTextureList;
|
||||||
|
|
||||||
@@ -608,12 +602,12 @@ void LLViewerTextureList::updateImages(F32 max_time)
|
|||||||
{
|
{
|
||||||
LLAppViewer::getTextureFetch()->setTextureBandwidth(LLViewerStats::getInstance()->mTextureKBitStat.getMeanPerSec());
|
LLAppViewer::getTextureFetch()->setTextureBandwidth(LLViewerStats::getInstance()->mTextureKBitStat.getMeanPerSec());
|
||||||
|
|
||||||
sNumImagesStat.addValue(sNumImages);
|
LLViewerStats::getInstance()->mNumImagesStat.addValue(sNumImages);
|
||||||
sNumRawImagesStat.addValue(LLImageRaw::sRawImageCount);
|
LLViewerStats::getInstance()->mNumRawImagesStat.addValue(LLImageRaw::sRawImageCount);
|
||||||
sGLTexMemStat.addValue((F32)BYTES_TO_MEGA_BYTES(LLImageGL::sGlobalTextureMemoryInBytes));
|
LLViewerStats::getInstance()->mGLTexMemStat.addValue((F32)BYTES_TO_MEGA_BYTES(LLImageGL::sGlobalTextureMemoryInBytes));
|
||||||
sGLBoundMemStat.addValue((F32)BYTES_TO_MEGA_BYTES(LLImageGL::sBoundTextureMemoryInBytes));
|
LLViewerStats::getInstance()->mGLBoundMemStat.addValue((F32)BYTES_TO_MEGA_BYTES(LLImageGL::sBoundTextureMemoryInBytes));
|
||||||
sRawMemStat.addValue((F32)BYTES_TO_MEGA_BYTES(LLImageRaw::sGlobalRawMemory));
|
LLViewerStats::getInstance()->mRawMemStat.addValue((F32)BYTES_TO_MEGA_BYTES(LLImageRaw::sGlobalRawMemory));
|
||||||
sFormattedMemStat.addValue((F32)BYTES_TO_MEGA_BYTES(LLImageFormatted::sGlobalFormattedMemory));
|
LLViewerStats::getInstance()->mFormattedMemStat.addValue((F32)BYTES_TO_MEGA_BYTES(LLImageFormatted::sGlobalFormattedMemory));
|
||||||
|
|
||||||
updateImagesDecodePriorities();
|
updateImagesDecodePriorities();
|
||||||
|
|
||||||
|
|||||||
@@ -207,13 +207,6 @@ public:
|
|||||||
static U32 sTextureBits;
|
static U32 sTextureBits;
|
||||||
static U32 sTexturePackets;
|
static U32 sTexturePackets;
|
||||||
|
|
||||||
static LLStat sNumImagesStat;
|
|
||||||
static LLStat sNumRawImagesStat;
|
|
||||||
static LLStat sGLTexMemStat;
|
|
||||||
static LLStat sGLBoundMemStat;
|
|
||||||
static LLStat sRawMemStat;
|
|
||||||
static LLStat sFormattedMemStat;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static S32 sNumImages;
|
static S32 sNumImages;
|
||||||
static void (*sUUIDCallback)(void**, const LLUUID &);
|
static void (*sUUIDCallback)(void**, const LLUUID &);
|
||||||
|
|||||||
@@ -85,6 +85,7 @@
|
|||||||
#include "llviewerobjectlist.h"
|
#include "llviewerobjectlist.h"
|
||||||
#include "llviewerparcelmgr.h"
|
#include "llviewerparcelmgr.h"
|
||||||
#include "llviewerregion.h" // for audio debugging.
|
#include "llviewerregion.h" // for audio debugging.
|
||||||
|
#include "llviewerstats.h"
|
||||||
#include "llviewerwindow.h" // For getSpinAxis
|
#include "llviewerwindow.h" // For getSpinAxis
|
||||||
#include "llvoavatar.h"
|
#include "llvoavatar.h"
|
||||||
#include "llvoground.h"
|
#include "llvoground.h"
|
||||||
@@ -391,7 +392,7 @@ void LLPipeline::init()
|
|||||||
getPool(LLDrawPool::POOL_BUMP);
|
getPool(LLDrawPool::POOL_BUMP);
|
||||||
getPool(LLDrawPool::POOL_GLOW);
|
getPool(LLDrawPool::POOL_GLOW);
|
||||||
|
|
||||||
mTrianglesDrawnStat.reset();
|
LLViewerStats::getInstance()->mTrianglesDrawnStat.reset();
|
||||||
resetFrameStats();
|
resetFrameStats();
|
||||||
|
|
||||||
for (U32 i = 0; i < NUM_RENDER_TYPES; ++i)
|
for (U32 i = 0; i < NUM_RENDER_TYPES; ++i)
|
||||||
@@ -1443,7 +1444,7 @@ void LLPipeline::resetFrameStats()
|
|||||||
{
|
{
|
||||||
assertInitialized();
|
assertInitialized();
|
||||||
|
|
||||||
mTrianglesDrawnStat.addValue(mTrianglesDrawn/1000.f);
|
LLViewerStats::getInstance()->mTrianglesDrawnStat.addValue(mTrianglesDrawn/1000.f);
|
||||||
|
|
||||||
if (mBatchCount > 0)
|
if (mBatchCount > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -443,7 +443,6 @@ public:
|
|||||||
S32 mMeanBatchSize;
|
S32 mMeanBatchSize;
|
||||||
S32 mTrianglesDrawn;
|
S32 mTrianglesDrawn;
|
||||||
S32 mNumVisibleNodes;
|
S32 mNumVisibleNodes;
|
||||||
LLStat mTrianglesDrawnStat;
|
|
||||||
S32 mVerticesRelit;
|
S32 mVerticesRelit;
|
||||||
|
|
||||||
S32 mLightingChanges;
|
S32 mLightingChanges;
|
||||||
|
|||||||
Reference in New Issue
Block a user