summaryrefslogtreecommitdiff
path: root/indra/llcommon/llfasttimer.cpp
diff options
context:
space:
mode:
authorRichard Linden <none@none>2012-09-05 18:49:28 -0700
committerRichard Linden <none@none>2012-09-05 18:49:28 -0700
commit62fcbb063a191fa4789145c3937e7bef6ce544bd (patch)
tree94f9489ffe45426408aacfbc216ef4ed5e373de7 /indra/llcommon/llfasttimer.cpp
parent88e455a3a536bae39a0c83ae9bc43cc1252ed4c0 (diff)
SH-3275 WIP Run viewer metrics for object update messages
first pass at LLTrace framework
Diffstat (limited to 'indra/llcommon/llfasttimer.cpp')
-rw-r--r--indra/llcommon/llfasttimer.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/indra/llcommon/llfasttimer.cpp b/indra/llcommon/llfasttimer.cpp
index 6970c29092..939e332c3b 100644
--- a/indra/llcommon/llfasttimer.cpp
+++ b/indra/llcommon/llfasttimer.cpp
@@ -216,7 +216,7 @@ LLFastTimer::NamedTimer::NamedTimer(const std::string& name)
: mName(name),
mCollapsed(true),
mParent(NULL),
- mTotalTimeCounter(0),
+ mTreeTimeCounter(0),
mCountAverage(0),
mCallAverage(0),
mNeedsSorting(false),
@@ -389,6 +389,8 @@ void LLFastTimer::NamedTimer::accumulateTimings()
U32 self_time_delta = cumulative_time_delta - cur_data->mChildTime;
cur_data->mChildTime = 0;
cur_timer->mFrameState->mSelfTimeCounter += self_time_delta;
+ cur_timer->mFrameState->mTotalTimeCounter += cumulative_time_delta;
+
cur_timer->mStartTime = cur_time;
cur_data = &cur_timer->mLastTimerData;
@@ -403,10 +405,10 @@ void LLFastTimer::NamedTimer::accumulateTimings()
++it)
{
NamedTimer* timerp = (*it);
- timerp->mTotalTimeCounter = timerp->getFrameState().mSelfTimeCounter;
+ timerp->mTreeTimeCounter = timerp->getFrameState().mSelfTimeCounter;
for (child_const_iter child_it = timerp->beginChildren(); child_it != timerp->endChildren(); ++child_it)
{
- timerp->mTotalTimeCounter += (*child_it)->mTotalTimeCounter;
+ timerp->mTreeTimeCounter += (*child_it)->mTreeTimeCounter;
}
S32 cur_frame = sCurFrameIndex;
@@ -415,8 +417,8 @@ void LLFastTimer::NamedTimer::accumulateTimings()
// update timer history
int hidx = cur_frame % HISTORY_NUM;
- timerp->mCountHistory[hidx] = timerp->mTotalTimeCounter;
- timerp->mCountAverage = ((U64)timerp->mCountAverage * cur_frame + timerp->mTotalTimeCounter) / (cur_frame+1);
+ timerp->mCountHistory[hidx] = timerp->mTreeTimeCounter;
+ timerp->mCountAverage = ((U64)timerp->mCountAverage * cur_frame + timerp->mTreeTimeCounter) / (cur_frame+1);
timerp->mCallHistory[hidx] = timerp->getFrameState().mCalls;
timerp->mCallAverage = ((U64)timerp->mCallAverage * cur_frame + timerp->getFrameState().mCalls) / (cur_frame+1);
}