1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-16 21:05:28 +03:00

Add calls per second to the msp statistics page

This commit is contained in:
Pawel Spychalski (DzikuVx) 2024-04-26 14:19:27 +02:00
parent 3e637c1c54
commit aa9457a96a

View file

@ -14,12 +14,14 @@ var mspStatistics = function() {
ctime: new Date().getTime(),
count: 0,
duration: 0,
average: 0
average: 0,
callsPerSecond: 0
};
}
privateScope.statistics[code].count++;
privateScope.statistics[code].duration += duration;
privateScope.statistics[code].average = privateScope.statistics[code].duration / privateScope.statistics[code].count;
privateScope.statistics[code].callsPerSecond = privateScope.statistics[code].count / ((new Date().getTime() - privateScope.statistics[code].ctime) / 1000);
};
publicScope.get = function() {