Skip to content

Commit

Permalink
Fix recent successful runs count
Browse files Browse the repository at this point in the history
  • Loading branch information
rossjrw committed Jun 6, 2024
1 parent 1ea0183 commit b139c72
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions stats-frontend/status.html
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
)
)
const perfectActivationsCount = 30 * 24
return recentActivations / perfectActivationsCount
return recentActivations.length / perfectActivationsCount
})()

let missedActivations = (
Expand All @@ -135,7 +135,7 @@
})()
if (now - nearestHour(now) < avgRunTime) {
// Include this run in the success rate
successRate30Day = max(1, successRate30Day + 1 / (30 * 24))
successRate30Day = Math.max(1, successRate30Day + 1 / (30 * 24))
return setStatus("waiting", successRate30Day, avgRunTime - (now - nearestHour(now)))
}

Expand Down

0 comments on commit b139c72

Please sign in to comment.