|
|
@@ -40,10 +40,12 @@ class AverageStatReport {
|
|
40
|
40
|
* @param {number} nextValue
|
|
41
|
41
|
*/
|
|
42
|
42
|
addNext(nextValue) {
|
|
|
43
|
+ if (typeof nextValue === 'undefined') {
|
|
|
44
|
+ return;
|
|
|
45
|
+ }
|
|
|
46
|
+
|
|
43
|
47
|
if (typeof nextValue !== 'number') {
|
|
44
|
|
- logger.error(
|
|
45
|
|
- `${this.name} - invalid value for idx: ${this.count}`,
|
|
46
|
|
- nextValue);
|
|
|
48
|
+ logger.error(`${this.name} - invalid value for idx: ${this.count}`, nextValue);
|
|
47
|
49
|
} else if (!isNaN(nextValue)) {
|
|
48
|
50
|
this.sum += nextValue;
|
|
49
|
51
|
this.samples.push(nextValue);
|