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:
parent
3e637c1c54
commit
aa9457a96a
1 changed files with 3 additions and 1 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue