summaryrefslogtreecommitdiff
path: root/indra/llcommon/llstat.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llcommon/llstat.h')
-rw-r--r--indra/llcommon/llstat.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/indra/llcommon/llstat.h b/indra/llcommon/llstat.h
index e20c01f67f..5fa46fca75 100644
--- a/indra/llcommon/llstat.h
+++ b/indra/llcommon/llstat.h
@@ -37,6 +37,9 @@
#include "lltimer.h"
#include "llframetimer.h"
+// Set this if longer stats are needed
+#define ENABLE_LONG_TIME_STATS 0
+
//
// Accumulates statistics for an arbitrary length of time.
// Does this by maintaining a chain of accumulators, each one
@@ -52,19 +55,22 @@ protected:
public:
enum TimeScale {
+ SCALE_100MS,
SCALE_SECOND,
SCALE_MINUTE,
SCALE_TWO_MINUTE,
+#if ENABLE_LONG_TIME_STATS
SCALE_HOUR,
SCALE_DAY,
SCALE_WEEK,
-
+#endif
NUM_SCALES
};
F32 meanValue(TimeScale scale) const;
// see the subclasses for the specific meaning of value
+ F32 meanValueOverLast100ms() const { return meanValue(SCALE_100MS); }
F32 meanValueOverLastSecond() const { return meanValue(SCALE_SECOND); }
F32 meanValueOverLastMinute() const { return meanValue(SCALE_MINUTE); }