mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-16 12:55:13 +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(),
|
ctime: new Date().getTime(),
|
||||||
count: 0,
|
count: 0,
|
||||||
duration: 0,
|
duration: 0,
|
||||||
average: 0
|
average: 0,
|
||||||
|
callsPerSecond: 0
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
privateScope.statistics[code].count++;
|
privateScope.statistics[code].count++;
|
||||||
privateScope.statistics[code].duration += duration;
|
privateScope.statistics[code].duration += duration;
|
||||||
privateScope.statistics[code].average = privateScope.statistics[code].duration / privateScope.statistics[code].count;
|
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() {
|
publicScope.get = function() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue