Merge pull request #3297 from bluewave-labs/fix/avg-response-time-calc

fix: increment before calculate
This commit is contained in:
Alexander Holliday authored and GitHub committed 2026-02-17 15:42:22 -08:00
commit c7ccdafec2
1 file changed
+1 -1
@@ -79,6 +79,7 @@ export class StatusService implements IStatusService {
}
// Update stats
stats.totalChecks++;
// Last response time
stats.lastResponseTime = responseTime ?? 0;
@@ -100,7 +101,6 @@ export class StatusService implements IStatusService {
stats.avgResponseTime = avgResponseTime;
// Total checks
stats.totalChecks++;
if (status === true) {
stats.totalUpChecks++;
// Update the timeSinceLastFailure if needed