summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermessage.cpp
diff options
context:
space:
mode:
authorRichard Linden <none@none>2012-10-17 20:00:07 -0700
committerRichard Linden <none@none>2012-10-17 20:00:07 -0700
commita52d203a4f1d2988e8ffba16258f3f132f22f56d (patch)
treece95e59210aa9228b92dc2abc8d5a8028e63d4cd /indra/newview/llviewermessage.cpp
parente6ca5471a2a816a24888ae1b38332531b22b7254 (diff)
SH-3405 WIP convert existing stats to lltrace system
started conversion of llviewerassetstats removed old, dead LLViewerStats code made units tracing require units declaration clean up of units handling
Diffstat (limited to 'indra/newview/llviewermessage.cpp')
-rwxr-xr-xindra/newview/llviewermessage.cpp155
1 files changed, 9 insertions, 146 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index b3e1c9bdbe..82caa05983 100755
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -4416,18 +4416,18 @@ void send_agent_update(BOOL force_send, BOOL send_reliable)
// *TODO: Remove this dependency, or figure out a better way to handle
// this hack.
-extern U32 gObjectBits;
+extern LLUnit::Bits<U32> gObjectData;
void process_object_update(LLMessageSystem *mesgsys, void **user_data)
{
// Update the data counters
if (mesgsys->getReceiveCompressedSize())
{
- gObjectBits += mesgsys->getReceiveCompressedSize() * 8;
+ gObjectData += (LLUnit::Bytes<U32>)mesgsys->getReceiveCompressedSize();
}
else
{
- gObjectBits += mesgsys->getReceiveSize() * 8;
+ gObjectData += (LLUnit::Bytes<U32>)mesgsys->getReceiveSize();
}
// Update the object...
@@ -4439,11 +4439,11 @@ void process_compressed_object_update(LLMessageSystem *mesgsys, void **user_data
// Update the data counters
if (mesgsys->getReceiveCompressedSize())
{
- gObjectBits += mesgsys->getReceiveCompressedSize() * 8;
+ gObjectData += (LLUnit::Bytes<U32>)mesgsys->getReceiveCompressedSize();
}
else
{
- gObjectBits += mesgsys->getReceiveSize() * 8;
+ gObjectData += (LLUnit::Bytes<U32>)mesgsys->getReceiveSize();
}
// Update the object...
@@ -4455,11 +4455,11 @@ void process_cached_object_update(LLMessageSystem *mesgsys, void **user_data)
// Update the data counters
if (mesgsys->getReceiveCompressedSize())
{
- gObjectBits += mesgsys->getReceiveCompressedSize() * 8;
+ gObjectData += (LLUnit::Bytes<U32>)mesgsys->getReceiveCompressedSize();
}
else
{
- gObjectBits += mesgsys->getReceiveSize() * 8;
+ gObjectData += (LLUnit::Bytes<U32>)mesgsys->getReceiveSize();
}
// Update the object...
@@ -4471,11 +4471,11 @@ void process_terse_object_update_improved(LLMessageSystem *mesgsys, void **user_
{
if (mesgsys->getReceiveCompressedSize())
{
- gObjectBits += mesgsys->getReceiveCompressedSize() * 8;
+ gObjectData += (LLUnit::Bytes<U32>)mesgsys->getReceiveCompressedSize();
}
else
{
- gObjectBits += mesgsys->getReceiveSize() * 8;
+ gObjectData += (LLUnit::Bytes<U32>)mesgsys->getReceiveSize();
}
gObjectList.processCompressedObjectUpdate(mesgsys, user_data, OUT_TERSE_IMPROVED);
@@ -4763,140 +4763,6 @@ void process_sim_stats(LLMessageSystem *msg, void **user_data)
{
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;
- //}
}
/*
@@ -5968,7 +5834,6 @@ void process_alert_core(const std::string& message, BOOL modal)
if ( message == "You died and have been teleported to your home location")
{
LLStatViewer::KILLED.add(1);
- //LLViewerStats::getInstance()->incStat(LLViewerStats::ST_KILLED_COUNT);
}
else if( message == "Home position set." )
{
@@ -7395,8 +7260,6 @@ void onCovenantLoadComplete(LLVFS *vfs,
}
else
{
- //LLViewerStats::getInstance()->incStat( LLViewerStats::ST_DOWNLOAD_FAILED );
-
if( LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE == status ||
LL_ERR_FILE_EMPTY == status)
{