summaryrefslogtreecommitdiff
path: root/indra/llcommon
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llcommon')
-rw-r--r--indra/llcommon/lltrace.h5
-rw-r--r--indra/llcommon/lltracerecording.h16
2 files changed, 13 insertions, 8 deletions
diff --git a/indra/llcommon/lltrace.h b/indra/llcommon/lltrace.h
index 376248c87a..d1edaf969b 100644
--- a/indra/llcommon/lltrace.h
+++ b/indra/llcommon/lltrace.h
@@ -264,6 +264,7 @@ class MeasurementAccumulator
{
public:
typedef T value_t;
+ typedef F64 mean_t;
typedef MeasurementAccumulator<T> self_t;
MeasurementAccumulator()
@@ -380,6 +381,7 @@ class CountAccumulator
public:
typedef CountAccumulator<T> self_t;
typedef T value_t;
+ typedef F64 mean_t;
CountAccumulator()
: mSum(0),
@@ -418,17 +420,20 @@ class TimeBlockAccumulator
{
public:
typedef LLUnit<LLUnits::Seconds, F64> value_t;
+ typedef LLUnit<LLUnits::Seconds, F64> mean_t;
typedef TimeBlockAccumulator self_t;
// fake class that allows us to view call count aspect of timeblock accumulator
struct CallCountAspect
{
typedef U32 value_t;
+ typedef F32 mean_t;
};
struct SelfTimeAspect
{
typedef LLUnit<LLUnits::Seconds, F64> value_t;
+ typedef LLUnit<LLUnits::Seconds, F64> mean_t;
};
TimeBlockAccumulator();
diff --git a/indra/llcommon/lltracerecording.h b/indra/llcommon/lltracerecording.h
index 4419a22bbe..7c4113dbf0 100644
--- a/indra/llcommon/lltracerecording.h
+++ b/indra/llcommon/lltracerecording.h
@@ -297,7 +297,7 @@ namespace LLTrace
}
template <typename T>
- typename T::value_t getPeriodMin(const TraceType<T>& stat, U32 num_periods = S32_MAX) const
+ typename T::value_t getPeriodMin(const TraceType<T>& stat, size_t num_periods = U32_MAX) const
{
size_t total_periods = mRecordingPeriods.size();
num_periods = llmin(num_periods, total_periods);
@@ -312,7 +312,7 @@ namespace LLTrace
}
template <typename T>
- F64 getPeriodMinPerSec(const TraceType<T>& stat, U32 num_periods = S32_MAX) const
+ F64 getPeriodMinPerSec(const TraceType<T>& stat, size_t num_periods = U32_MAX) const
{
size_t total_periods = mRecordingPeriods.size();
num_periods = llmin(num_periods, total_periods);
@@ -327,7 +327,7 @@ namespace LLTrace
}
template <typename T>
- typename T::value_t getPeriodMax(const TraceType<T>& stat, U32 num_periods = S32_MAX) const
+ typename T::value_t getPeriodMax(const TraceType<T>& stat, size_t num_periods = U32_MAX) const
{
size_t total_periods = mRecordingPeriods.size();
num_periods = llmin(num_periods, total_periods);
@@ -342,7 +342,7 @@ namespace LLTrace
}
template <typename T>
- F64 getPeriodMaxPerSec(const TraceType<T>& stat, U32 num_periods = S32_MAX) const
+ F64 getPeriodMaxPerSec(const TraceType<T>& stat, size_t num_periods = U32_MAX) const
{
size_t total_periods = mRecordingPeriods.size();
num_periods = llmin(num_periods, total_periods);
@@ -357,12 +357,12 @@ namespace LLTrace
}
template <typename T>
- typename T::value_t getPeriodMean(const TraceType<T>& stat, U32 num_periods = S32_MAX) const
+ typename T::mean_t getPeriodMean(const TraceType<T>& stat, size_t num_periods = U32_MAX) const
{
size_t total_periods = mRecordingPeriods.size();
num_periods = llmin(num_periods, total_periods);
- typename T::value_t mean = 0.0;
+ typename T::mean_t mean = typename T::mean_t();
if (num_periods <= 0) { return mean; }
for (S32 i = 1; i <= num_periods; i++)
@@ -378,12 +378,12 @@ namespace LLTrace
}
template <typename T>
- typename T::value_t getPeriodMeanPerSec(const TraceType<T>& stat, U32 num_periods = S32_MAX) const
+ typename T::mean_t getPeriodMeanPerSec(const TraceType<T>& stat, size_t num_periods = U32_MAX) const
{
size_t total_periods = mRecordingPeriods.size();
num_periods = llmin(num_periods, total_periods);
- typename T::value_t mean = 0.0;
+ typename T::mean_t mean = typename T::mean_t();
if (num_periods <= 0) { return mean; }
for (S32 i = 1; i <= num_periods; i++)