diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/llcommon/llstat.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/linden/indra/llcommon/llstat.h b/linden/indra/llcommon/llstat.h index a0a86e6..0a7e014 100644 --- a/linden/indra/llcommon/llstat.h +++ b/linden/indra/llcommon/llstat.h | |||
@@ -37,6 +37,9 @@ | |||
37 | #include "lltimer.h" | 37 | #include "lltimer.h" |
38 | #include "llframetimer.h" | 38 | #include "llframetimer.h" |
39 | 39 | ||
40 | // Set this if longer stats are needed | ||
41 | #define ENABLE_LONG_TIME_STATS 0 | ||
42 | |||
40 | // | 43 | // |
41 | // Accumulates statistics for an arbitrary length of time. | 44 | // Accumulates statistics for an arbitrary length of time. |
42 | // Does this by maintaining a chain of accumulators, each one | 45 | // Does this by maintaining a chain of accumulators, each one |
@@ -52,19 +55,22 @@ protected: | |||
52 | 55 | ||
53 | public: | 56 | public: |
54 | enum TimeScale { | 57 | enum TimeScale { |
58 | SCALE_100MS, | ||
55 | SCALE_SECOND, | 59 | SCALE_SECOND, |
56 | SCALE_MINUTE, | 60 | SCALE_MINUTE, |
57 | SCALE_TWO_MINUTE, | 61 | SCALE_TWO_MINUTE, |
62 | #if ENABLE_LONG_TIME_STATS | ||
58 | SCALE_HOUR, | 63 | SCALE_HOUR, |
59 | SCALE_DAY, | 64 | SCALE_DAY, |
60 | SCALE_WEEK, | 65 | SCALE_WEEK, |
61 | 66 | #endif | |
62 | NUM_SCALES | 67 | NUM_SCALES |
63 | }; | 68 | }; |
64 | 69 | ||
65 | F32 meanValue(TimeScale scale) const; | 70 | F32 meanValue(TimeScale scale) const; |
66 | // see the subclasses for the specific meaning of value | 71 | // see the subclasses for the specific meaning of value |
67 | 72 | ||
73 | F32 meanValueOverLast100ms() const { return meanValue(SCALE_100MS); } | ||
68 | F32 meanValueOverLastSecond() const { return meanValue(SCALE_SECOND); } | 74 | F32 meanValueOverLastSecond() const { return meanValue(SCALE_SECOND); } |
69 | F32 meanValueOverLastMinute() const { return meanValue(SCALE_MINUTE); } | 75 | F32 meanValueOverLastMinute() const { return meanValue(SCALE_MINUTE); } |
70 | 76 | ||