summaryrefslogtreecommitdiff
path: root/indra/llcommon/lltracerecording.h
diff options
context:
space:
mode:
authorRichard Linden <none@none>2013-03-25 00:18:06 -0700
committerRichard Linden <none@none>2013-03-25 00:18:06 -0700
commit935dce7d6b0a343cef5b13f53d6da5d0c2dc6a73 (patch)
tree1517fc3ea00f29a5c64050cb4fc756dec30caf63 /indra/llcommon/lltracerecording.h
parent68f9f656cd22332e46959a90347e38f79c19a66c (diff)
SH-3931 WIP Interesting: Add graphs to visualize scene load metrics
fixed some compile errors made label spacing automatic on stat bars fixed infinite values coming from stats
Diffstat (limited to 'indra/llcommon/lltracerecording.h')
-rw-r--r--indra/llcommon/lltracerecording.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/indra/llcommon/lltracerecording.h b/indra/llcommon/lltracerecording.h
index 3e7ed2b592..b96d0666e5 100644
--- a/indra/llcommon/lltracerecording.h
+++ b/indra/llcommon/lltracerecording.h
@@ -305,7 +305,7 @@ namespace LLTrace
U32 num_periods = mRecordingPeriods.size();
for (S32 i = 0; i < num_periods; i++)
{
- min_val = llmin(min_val, mRecordingPeriods[i].getSum(stat));
+ min_val = llmin(min_val, mRecordingPeriods[(mCurPeriod + i) % num_periods].getSum(stat));
}
return min_val;
}
@@ -317,7 +317,7 @@ namespace LLTrace
U32 num_periods = mRecordingPeriods.size();
for (S32 i = 0; i < num_periods; i++)
{
- min_val = llmin(min_val, mRecordingPeriods[i].getPerSec(stat));
+ min_val = llmin(min_val, mRecordingPeriods[(mCurPeriod + i) % num_periods].getPerSec(stat));
}
return min_val;
}
@@ -329,7 +329,7 @@ namespace LLTrace
U32 num_periods = mRecordingPeriods.size();
for (S32 i = 0; i < num_periods; i++)
{
- max_val = llmax(max_val, mRecordingPeriods[i].getSum(stat));
+ max_val = llmax(max_val, mRecordingPeriods[(mCurPeriod + i) % num_periods].getSum(stat));
}
return max_val;
}
@@ -339,9 +339,9 @@ namespace LLTrace
{
F64 max_val = (std::numeric_limits<F64>::min)();
U32 num_periods = mRecordingPeriods.size();
- for (S32 i = 0; i < num_periods; i++)
+ for (S32 i = 1; i < num_periods; i++)
{
- max_val = llmax(max_val, mRecordingPeriods[i].getPerSec(stat));
+ max_val = llmax(max_val, mRecordingPeriods[(mCurPeriod + i) % num_periods].getPerSec(stat));
}
return max_val;
}
@@ -353,9 +353,9 @@ namespace LLTrace
U32 num_periods = mRecordingPeriods.size();
for (S32 i = 0; i < num_periods; i++)
{
- if (mRecordingPeriods[i].getDuration() > 0.f)
+ if (mRecordingPeriods[(mCurPeriod + i) % num_periods].getDuration() > 0.f)
{
- mean += mRecordingPeriods[i].getSum(stat);
+ mean += mRecordingPeriods[(mCurPeriod + i) % num_periods].getSum(stat);
}
}
mean /= num_periods;
@@ -371,7 +371,7 @@ namespace LLTrace
{
if (mRecordingPeriods[i].getDuration() > 0.f)
{
- mean += mRecordingPeriods[i].getPerSec(stat);
+ mean += mRecordingPeriods[(mCurPeriod + i) % num_periods].getPerSec(stat);
}
}
mean /= num_periods;