averaging fixed

This commit is contained in:
Wolfgang Hottgenroth
2017-08-25 18:18:11 +02:00
parent 21f7f02a63
commit d9528decae

View File

@ -41,8 +41,8 @@ class MissingEventProcessor extends Processor.AProcessor {
clientEntry.count += 1 clientEntry.count += 1
if (clientEntry.count >= 1) { if (clientEntry.count >= 1) {
clientEntry.delaySum += clientEntry.delay clientEntry.delaySum += clientEntry.delay
clientEntry.avgDelay = clientEntry.delaySum / clientEntry.count
} }
clientEntry.avgDelay = clientEntry.delaySum / clientEntry.count
this.clientMap.set(client, clientEntry) this.clientMap.set(client, clientEntry)
log.info(`Entry for ${client} updated`) log.info(`Entry for ${client} updated`)
} else { } else {