diff options
| author | Richard Linden <none@none> | 2013-10-17 19:18:53 -0700 |
|---|---|---|
| committer | Richard Linden <none@none> | 2013-10-17 19:18:53 -0700 |
| commit | 18aedf0241ba893e12140c0a3855f328d2b4eded (patch) | |
| tree | 11d95ba4f7578d52e8ab69b35b181f956f4a8590 /indra/llcommon/lltracerecording.cpp | |
| parent | ec178690240a56ffa43b8f37c6b581c9008d3d7d (diff) | |
fix for assert at runtime (reading stats from recording while it was active)
fix for bad values returns from getPeriodMin and getPeriodMax on count stats when no counts recorded
fix for gcc compile time error (typename ftw)
Diffstat (limited to 'indra/llcommon/lltracerecording.cpp')
| -rw-r--r-- | indra/llcommon/lltracerecording.cpp | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/indra/llcommon/lltracerecording.cpp b/indra/llcommon/lltracerecording.cpp index 2b2b55f614..6ad6bbe356 100644 --- a/indra/llcommon/lltracerecording.cpp +++ b/indra/llcommon/lltracerecording.cpp @@ -137,6 +137,12 @@ void Recording::appendRecording( Recording& other ) mElapsedSeconds += other.mElapsedSeconds; } +bool Recording::hasValue(const StatType<TimeBlockAccumulator>& stat) +{ + llassert(!isStarted()); + return mBuffers->mStackTimers[stat.getIndex()].hasValue(); +} + F64Seconds Recording::getSum(const StatType<TimeBlockAccumulator>& stat) { llassert(!isStarted()); @@ -219,6 +225,12 @@ F64Kilobytes Recording::getLastValue(const StatType<MemAccumulator>& stat) return F64Bytes(mBuffers->mMemStats[stat.getIndex()].mSize.getLastValue()); } +bool Recording::hasValue(const StatType<MemAccumulator::AllocationFacet>& stat) +{ + llassert(!isStarted()); + return mBuffers->mMemStats[stat.getIndex()].mAllocations.hasValue(); +} + F64Kilobytes Recording::getSum(const StatType<MemAccumulator::AllocationFacet>& stat) { llassert(!isStarted()); @@ -237,6 +249,13 @@ S32 Recording::getSampleCount(const StatType<MemAccumulator::AllocationFacet>& s return mBuffers->mMemStats[stat.getIndex()].mAllocations.getSampleCount(); } +bool Recording::hasValue(const StatType<MemAccumulator::DeallocationFacet>& stat) +{ + llassert(!isStarted()); + return mBuffers->mMemStats[stat.getIndex()].mDeallocations.hasValue(); +} + + F64Kilobytes Recording::getSum(const StatType<MemAccumulator::DeallocationFacet>& stat) { llassert(!isStarted()); @@ -255,13 +274,19 @@ S32 Recording::getSampleCount(const StatType<MemAccumulator::DeallocationFacet>& return mBuffers->mMemStats[stat.getIndex()].mDeallocations.getSampleCount(); } -F64 Recording::getSum( const StatType<CountAccumulator>& stat ) +bool Recording::hasValue(const StatType<CountAccumulator>& stat) +{ + llassert(!isStarted()); + return mBuffers->mCounts[stat.getIndex()].hasValue(); +} + +F64 Recording::getSum(const StatType<CountAccumulator>& stat) { llassert(!isStarted()); return mBuffers->mCounts[stat.getIndex()].getSum(); } -F64 Recording::getSum( const StatType<EventAccumulator>& stat ) +F64 Recording::getSum( const StatType<EventAccumulator>& stat) { llassert(!isStarted()); return (F64)mBuffers->mEvents[stat.getIndex()].getSum(); |
