-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Bug in the below code
Calculates percentage downtime for a week in minutes.
/**
* calculates percentage down time
* @param downMins
* @return
*/
private double getUpPercentage(long downMins) {
double upPercentage = HUNDERED;
if (downMins > ZERO) {
upPercentage = (HUNDERED - ((downMins * HUNDERED) / TOTAL_WEEK_MINS));
}
return upPercentage;
}
Sample emails showing uptime as negative....
Site : http://hiox.org/33178-new-google.php
Uptime : -82.0%
Total Mins down : 18392
Site : http://www.zytoon.me/monitor/
Uptime : -173.0%
Total Mins down : 27525
Metadata
Metadata
Assignees
Labels
No labels