summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermessage.cpp
diff options
context:
space:
mode:
authorRichard Linden <none@none>2012-10-15 19:43:35 -0700
committerRichard Linden <none@none>2012-10-15 19:43:35 -0700
commit8d2f7a526545a10cd3669bf837a0b6f02cf5fe71 (patch)
tree90c7fdd0a64a2364d3e7ab636f467a776c2f1676 /indra/newview/llviewermessage.cpp
parent041dfccd1ea5b59c1b3c4e37e9a5495cad342c8f (diff)
SH-3405 WIP convert existing stats to lltrace system
converted all remaining LLViewerStats to lltrace
Diffstat (limited to 'indra/newview/llviewermessage.cpp')
-rwxr-xr-xindra/newview/llviewermessage.cpp264
1 files changed, 145 insertions, 119 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index ec7d91ec4f..b3e1c9bdbe 100755
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -4753,125 +4753,150 @@ void process_sim_stats(LLMessageSystem *msg, void **user_data)
F32 stat_value;
msg->getU32("Stat", "StatID", stat_id, i);
msg->getF32("Stat", "StatValue", stat_value, i);
- switch (stat_id)
+ LLStatViewer::SimMeasurementSampler* measurementp = LLStatViewer::SimMeasurementSampler::getInstance((ESimStatID)stat_id);
+
+ if (measurementp )
{
- case LL_SIM_STAT_TIME_DILATION:
- LLStatViewer::SIM_TIME_DILATION.sample(stat_value);
- //LLViewerStats::getInstance()->mSimTimeDilation.addValue(stat_value);
- break;
- case LL_SIM_STAT_FPS:
- LLStatViewer::SIM_FPS.sample(stat_value);
- //LLViewerStats::getInstance()->mSimFPS.addValue(stat_value);
- break;
- case LL_SIM_STAT_PHYSFPS:
- LLStatViewer::SIM_PHYSICS_FPS.sample(stat_value);
- //LLViewerStats::getInstance()->mSimPhysicsFPS.addValue(stat_value);
- break;
- case LL_SIM_STAT_AGENTUPS:
- LLStatViewer::SIM_AGENT_UPS.sample(stat_value);
- //LLViewerStats::getInstance()->mSimAgentUPS.addValue(stat_value);
- break;
- case LL_SIM_STAT_FRAMEMS:
- LLViewerStats::getInstance()->mSimFrameMsec.addValue(stat_value);
- break;
- case LL_SIM_STAT_NETMS:
- LLViewerStats::getInstance()->mSimNetMsec.addValue(stat_value);
- break;
- case LL_SIM_STAT_SIMOTHERMS:
- LLViewerStats::getInstance()->mSimSimOtherMsec.addValue(stat_value);
- break;
- case LL_SIM_STAT_SIMPHYSICSMS:
- LLViewerStats::getInstance()->mSimSimPhysicsMsec.addValue(stat_value);
- break;
- case LL_SIM_STAT_AGENTMS:
- LLViewerStats::getInstance()->mSimAgentMsec.addValue(stat_value);
- break;
- case LL_SIM_STAT_IMAGESMS:
- LLViewerStats::getInstance()->mSimImagesMsec.addValue(stat_value);
- break;
- case LL_SIM_STAT_SCRIPTMS:
- LLViewerStats::getInstance()->mSimScriptMsec.addValue(stat_value);
- break;
- case LL_SIM_STAT_NUMTASKS:
- LLViewerStats::getInstance()->mSimObjects.addValue(stat_value);
- break;
- case LL_SIM_STAT_NUMTASKSACTIVE:
- LLViewerStats::getInstance()->mSimActiveObjects.addValue(stat_value);
- break;
- case LL_SIM_STAT_NUMAGENTMAIN:
- LLViewerStats::getInstance()->mSimMainAgents.addValue(stat_value);
- break;
- case LL_SIM_STAT_NUMAGENTCHILD:
- LLViewerStats::getInstance()->mSimChildAgents.addValue(stat_value);
- break;
- case LL_SIM_STAT_NUMSCRIPTSACTIVE:
- LLViewerStats::getInstance()->mSimActiveScripts.addValue(stat_value);
- break;
- case LL_SIM_STAT_SCRIPT_EPS:
- LLViewerStats::getInstance()->mSimScriptEPS.addValue(stat_value);
- break;
- case LL_SIM_STAT_INPPS:
- LLViewerStats::getInstance()->mSimInPPS.addValue(stat_value);
- break;
- case LL_SIM_STAT_OUTPPS:
- LLViewerStats::getInstance()->mSimOutPPS.addValue(stat_value);
- break;
- case LL_SIM_STAT_PENDING_DOWNLOADS:
- LLViewerStats::getInstance()->mSimPendingDownloads.addValue(stat_value);
- break;
- case LL_SIM_STAT_PENDING_UPLOADS:
- LLViewerStats::getInstance()->mSimPendingUploads.addValue(stat_value);
- break;
- case LL_SIM_STAT_PENDING_LOCAL_UPLOADS:
- LLViewerStats::getInstance()->mSimPendingLocalUploads.addValue(stat_value);
- break;
- case LL_SIM_STAT_TOTAL_UNACKED_BYTES:
- LLViewerStats::getInstance()->mSimTotalUnackedBytes.addValue(stat_value / 1024.f);
- break;
- case LL_SIM_STAT_PHYSICS_PINNED_TASKS:
- LLViewerStats::getInstance()->mPhysicsPinnedTasks.addValue(stat_value);
- break;
- case LL_SIM_STAT_PHYSICS_LOD_TASKS:
- LLViewerStats::getInstance()->mPhysicsLODTasks.addValue(stat_value);
- break;
- case LL_SIM_STAT_SIMPHYSICSSTEPMS:
- LLViewerStats::getInstance()->mSimSimPhysicsStepMsec.addValue(stat_value);
- break;
- case LL_SIM_STAT_SIMPHYSICSSHAPEMS:
- LLViewerStats::getInstance()->mSimSimPhysicsShapeUpdateMsec.addValue(stat_value);
- break;
- case LL_SIM_STAT_SIMPHYSICSOTHERMS:
- LLViewerStats::getInstance()->mSimSimPhysicsOtherMsec.addValue(stat_value);
- break;
- case LL_SIM_STAT_SIMPHYSICSMEMORY:
- LLViewerStats::getInstance()->mPhysicsMemoryAllocated.addValue(stat_value);
- break;
- case LL_SIM_STAT_SIMSPARETIME:
- LLViewerStats::getInstance()->mSimSpareMsec.addValue(stat_value);
- break;
- case LL_SIM_STAT_SIMSLEEPTIME:
- LLViewerStats::getInstance()->mSimSleepMsec.addValue(stat_value);
- break;
- case LL_SIM_STAT_IOPUMPTIME:
- LLViewerStats::getInstance()->mSimPumpIOMsec.addValue(stat_value);
- break;
- case LL_SIM_STAT_PCTSCRIPTSRUN:
- LLViewerStats::getInstance()->mSimPctScriptsRun.addValue(stat_value);
- break;
- case LL_SIM_STAT_SIMAISTEPTIMEMS:
- LLViewerStats::getInstance()->mSimSimAIStepMsec.addValue(stat_value);
- break;
- case LL_SIM_STAT_SKIPPEDAISILSTEPS_PS:
- LLViewerStats::getInstance()->mSimSimSkippedSilhouetteSteps.addValue(stat_value);
- break;
- case LL_SIM_STAT_PCTSTEPPEDCHARACTERS:
- LLViewerStats::getInstance()->mSimSimPctSteppedCharacters.addValue(stat_value);
- break;
- default:
- // Used to be a commented out warning.
- LL_DEBUGS("Messaging") << "Unknown stat id" << stat_id << LL_ENDL;
- break;
+ measurementp->sample(stat_value);
}
+ else
+ {
+ llwarns << "Unknown sim stat identifier: " << stat_id << llendl;
+ }
+ //switch (stat_id)
+ //{
+ //case LL_SIM_STAT_TIME_DILATION:
+ // LLStatViewer::SIM_TIME_DILATION.sample(stat_value);
+ // //LLViewerStats::getInstance()->mSimTimeDilation.addValue(stat_value);
+ // break;
+ //case LL_SIM_STAT_FPS:
+ // LLStatViewer::SIM_FPS.sample(stat_value);
+ // //LLViewerStats::getInstance()->mSimFPS.addValue(stat_value);
+ // break;
+ //case LL_SIM_STAT_PHYSFPS:
+ // LLStatViewer::SIM_PHYSICS_FPS.sample(stat_value);
+ // //LLViewerStats::getInstance()->mSimPhysicsFPS.addValue(stat_value);
+ // break;
+ //case LL_SIM_STAT_AGENTUPS:
+ // LLStatViewer::SIM_AGENT_UPS.sample(stat_value);
+ // //LLViewerStats::getInstance()->mSimAgentUPS.addValue(stat_value);
+ // break;
+ //case LL_SIM_STAT_FRAMEMS:
+ // LLStatViewer::SIM_FRAME_TIME.sample(stat_value);
+ // //LLViewerStats::getInstance()->mSimFrameMsec.addValue(stat_value);
+ // break;
+ //case LL_SIM_STAT_NETMS:
+ // LLStatViewer::SIM_NET_TIME.sample(stat_value);
+ // //LLViewerStats::getInstance()->mSimNetMsec.addValue(stat_value);
+ // break;
+ //case LL_SIM_STAT_SIMOTHERMS:
+ // LLStatViewer::SIM_PHYSICS_OTHER_TIME.sample(stat_value);
+ // //LLViewerStats::getInstance()->mSimSimOtherMsec.addValue(stat_value);
+ // break;
+ //case LL_SIM_STAT_SIMPHYSICSMS:
+ // LLStatViewer::SIM_PHYSICS_TIME.sample(stat_value);
+ // //LLViewerStats::getInstance()->mSimSimPhysicsMsec.addValue(stat_value);
+ // break;
+ //case LL_SIM_STAT_AGENTMS:
+ // LLStatViewer::SIM_AGENTS_TIME.sample(stat_value);
+ // //LLViewerStats::getInstance()->mSimAgentMsec.addValue(stat_value);
+ // break;
+ //case LL_SIM_STAT_IMAGESMS:
+ // LLStatViewer::SIM_IMAGES_TIME.sample(stat_value);
+ // //LLViewerStats::getInstance()->mSimImagesMsec.addValue(stat_value);
+ // break;
+ //case LL_SIM_STAT_SCRIPTMS:
+ // LLStatViewer::SIM_SCRIPTS_TIME.sample(stat_value);
+ // //LLViewerStats::getInstance()->mSimScriptMsec.addValue(stat_value);
+ // break;
+ //case LL_SIM_STAT_NUMTASKS:
+ // LLStatViewer::SIM_OBJECTS.sample(stat_value);
+ // //LLViewerStats::getInstance()->mSimObjects.addValue(stat_value);
+ // break;
+ //case LL_SIM_STAT_NUMTASKSACTIVE:
+ // LLStatViewer::SIM_ACTIVE_OBJECTS.sample(stat_value);
+ // //LLViewerStats::getInstance()->mSimActiveObjects.addValue(stat_value);
+ // break;
+ //case LL_SIM_STAT_NUMAGENTMAIN:
+ // LLStatViewer::SIM_MAIN_AGENTS.sample(stat_value);
+ // //LLViewerStats::getInstance()->mSimMainAgents.addValue(stat_value);
+ // break;
+ //case LL_SIM_STAT_NUMAGENTCHILD:
+ // LLStatViewer::SIM_CHILD_AGENTS.sample(stat_value);
+ // //LLViewerStats::getInstance()->mSimChildAgents.addValue(stat_value);
+ // break;
+ //case LL_SIM_STAT_NUMSCRIPTSACTIVE:
+ // LLStatViewer::SIM_ACTIVE_SCRIPTS.sample(stat_value);
+ // //LLViewerStats::getInstance()->mSimActiveScripts.addValue(stat_value);
+ // break;
+ //case LL_SIM_STAT_SCRIPT_EPS:
+ // LLStatViewer::SIM_SCRIPT_EPS.sample(stat_value);
+ // //LLViewerStats::getInstance()->mSimScriptEPS.addValue(stat_value);
+ // break;
+ //case LL_SIM_STAT_INPPS:
+ // LLStatViewer::SIM_IN_PACKETS_PER_SEC.sample(stat_value);
+ // //LLViewerStats::getInstance()->mSimInPPS.addValue(stat_value);
+ // break;
+ //case LL_SIM_STAT_OUTPPS:
+ // LLStatViewer::SIM_OUT_PACKETS_PER_SEC.sample(stat_value);
+ // //LLViewerStats::getInstance()->mSimOutPPS.addValue(stat_value);
+ // break;
+ //case LL_SIM_STAT_PENDING_DOWNLOADS:
+ // LLViewerStats::getInstance()->mSimPendingDownloads.addValue(stat_value);
+ // break;
+ //case LL_SIM_STAT_PENDING_UPLOADS:
+ // LLViewerStats::getInstance()->mSimPendingUploads.addValue(stat_value);
+ // break;
+ //case LL_SIM_STAT_PENDING_LOCAL_UPLOADS:
+ // LLViewerStats::getInstance()->mSimPendingLocalUploads.addValue(stat_value);
+ // break;
+ //case LL_SIM_STAT_TOTAL_UNACKED_BYTES:
+ // LLViewerStats::getInstance()->mSimTotalUnackedBytes.addValue(stat_value / 1024.f);
+ // break;
+ //case LL_SIM_STAT_PHYSICS_PINNED_TASKS:
+ // LLViewerStats::getInstance()->mPhysicsPinnedTasks.addValue(stat_value);
+ // break;
+ //case LL_SIM_STAT_PHYSICS_LOD_TASKS:
+ // LLViewerStats::getInstance()->mPhysicsLODTasks.addValue(stat_value);
+ // break;
+ //case LL_SIM_STAT_SIMPHYSICSSTEPMS:
+ // LLViewerStats::getInstance()->mSimSimPhysicsStepMsec.addValue(stat_value);
+ // break;
+ //case LL_SIM_STAT_SIMPHYSICSSHAPEMS:
+ // LLViewerStats::getInstance()->mSimSimPhysicsShapeUpdateMsec.addValue(stat_value);
+ // break;
+ //case LL_SIM_STAT_SIMPHYSICSOTHERMS:
+ // LLViewerStats::getInstance()->mSimSimPhysicsOtherMsec.addValue(stat_value);
+ // break;
+ //case LL_SIM_STAT_SIMPHYSICSMEMORY:
+ // LLViewerStats::getInstance()->mPhysicsMemoryAllocated.addValue(stat_value);
+ // break;
+ //case LL_SIM_STAT_SIMSPARETIME:
+ // LLViewerStats::getInstance()->mSimSpareMsec.addValue(stat_value);
+ // break;
+ //case LL_SIM_STAT_SIMSLEEPTIME:
+ // LLViewerStats::getInstance()->mSimSleepMsec.addValue(stat_value);
+ // break;
+ //case LL_SIM_STAT_IOPUMPTIME:
+ // LLViewerStats::getInstance()->mSimPumpIOMsec.addValue(stat_value);
+ // break;
+ //case LL_SIM_STAT_PCTSCRIPTSRUN:
+ // LLViewerStats::getInstance()->mSimPctScriptsRun.addValue(stat_value);
+ // break;
+ //case LL_SIM_STAT_SIMAISTEPTIMEMS:
+ // LLViewerStats::getInstance()->mSimSimAIStepMsec.addValue(stat_value);
+ // break;
+ //case LL_SIM_STAT_SKIPPEDAISILSTEPS_PS:
+ // LLViewerStats::getInstance()->mSimSimSkippedSilhouetteSteps.addValue(stat_value);
+ // break;
+ //case LL_SIM_STAT_PCTSTEPPEDCHARACTERS:
+ // LLViewerStats::getInstance()->mSimSimPctSteppedCharacters.addValue(stat_value);
+ // break;
+ //default:
+ // // Used to be a commented out warning.
+ // LL_DEBUGS("Messaging") << "Unknown stat id" << stat_id << LL_ENDL;
+ // break;
+ //}
}
/*
@@ -5942,7 +5967,8 @@ void process_alert_core(const std::string& message, BOOL modal)
// HACK -- handle callbacks for specific alerts. It also is localized in notifications.xml
if ( message == "You died and have been teleported to your home location")
{
- LLViewerStats::getInstance()->incStat(LLViewerStats::ST_KILLED_COUNT);
+ LLStatViewer::KILLED.add(1);
+ //LLViewerStats::getInstance()->incStat(LLViewerStats::ST_KILLED_COUNT);
}
else if( message == "Home position set." )
{
@@ -7369,7 +7395,7 @@ void onCovenantLoadComplete(LLVFS *vfs,
}
else
{
- LLViewerStats::getInstance()->incStat( LLViewerStats::ST_DOWNLOAD_FAILED );
+ //LLViewerStats::getInstance()->incStat( LLViewerStats::ST_DOWNLOAD_FAILED );
if( LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE == status ||
LL_ERR_FILE_EMPTY == status)