@@ -85,15 +85,15 @@ class LLStatsAccumulator
85
85
inline F32 getStdDev () const
86
86
{
87
87
const F64 mean = getMean ();
88
- if (mCount < 2 )
89
- {
90
- return 0 .f ;
91
- }
92
- else
93
- {
94
- F32 variance = F32 (mSumOfSquares / mCount - (mean * mean));
95
- return sqrt (llmax (0 .f , variance));
96
- }
88
+ if (mCount < 2 )
89
+ {
90
+ return 0 .f ;
91
+ }
92
+ else
93
+ {
94
+ F32 variance = F32 (mSumOfSquares / mCount - (mean * mean));
95
+ return sqrt (llmax (0 .f , variance));
96
+ }
97
97
}
98
98
99
99
inline U32 getCount () const
@@ -113,9 +113,9 @@ class LLStatsAccumulator
113
113
inline LLSD asLLSD () const
114
114
{
115
115
LLSD data;
116
- data[" count" ] = (S32) getCount ();
117
- data[" sum" ] = getSum ();
118
- data[" sum_of_squares" ] = getSumOfSquares ();
116
+ data[" count" ] = (S32) getCount ();
117
+ data[" sum" ] = getSum ();
118
+ data[" sum_of_squares" ] = getSumOfSquares ();
119
119
data[" mean" ] = getMean ();
120
120
data[" std_dev" ] = getStdDev ();
121
121
data[" min" ] = getMinValue ();
@@ -135,24 +135,24 @@ class LLStatsAccumulator
135
135
// Assumes the samples are frame times
136
136
inline F32 fps (LLStatsAccumulator& accum)
137
137
{
138
- F32 mean = accum.getMean ();
139
- if (mean > 0 .f )
140
- {
141
- return 1 .0f /mean;
142
- }
143
- return 0 .0f ;
138
+ F32 mean = accum.getMean ();
139
+ if (mean > 0 .f )
140
+ {
141
+ return 1 .0f /mean;
142
+ }
143
+ return 0 .0f ;
144
144
}
145
145
146
146
// Assumes the samples are frame times
147
147
// ofr = observed frame rate, which has frame times weighted by length, since long frames count more toward user experience.
148
148
inline F32 ofr (LLStatsAccumulator& accum)
149
149
{
150
- F32 sum = accum.getSum ();
151
- F32 sum_of_squares = accum.getSumOfSquares ();
152
- if (sum_of_squares > 0 .0f )
153
- {
154
- return sum/sum_of_squares;
155
- }
150
+ F32 sum = accum.getSum ();
151
+ F32 sum_of_squares = accum.getSumOfSquares ();
152
+ if (sum_of_squares > 0 .0f )
153
+ {
154
+ return sum/sum_of_squares;
155
+ }
156
156
return 0 .0f ;
157
157
}
158
158
0 commit comments