Skip to content

Commit

Permalink
CPU Health check shouldn't have been multiplying result by 100
Browse files Browse the repository at this point in the history
- closes #20
  • Loading branch information
Kritner committed Oct 14, 2020
1 parent 9a7b404 commit 1c23969
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,18 @@ public CpuHealthCheckGrain(IHostEnvironmentStatistics hostEnvironmentStatistics)
if (_hostEnvironmentStatistics.CpuUsage > UnhealthyThreshold)
{
return Task.FromResult(HealthCheckResult.Unhealthy(
$"CPU utilization is unhealthy at {_hostEnvironmentStatistics.CpuUsage * 100}%."));
$"CPU utilization is unhealthy at {_hostEnvironmentStatistics.CpuUsage}%."));

}

if (_hostEnvironmentStatistics.CpuUsage > DegradedThreshold)
{
return Task.FromResult(HealthCheckResult.Degraded(
$"CPU utilization is degraded at {_hostEnvironmentStatistics.CpuUsage * 100}%."));
$"CPU utilization is degraded at {_hostEnvironmentStatistics.CpuUsage}%."));
}

return Task.FromResult(HealthCheckResult.Healthy(
$"CPU utilization is healthy at {_hostEnvironmentStatistics.CpuUsage * 100}%."));
$"CPU utilization is healthy at {_hostEnvironmentStatistics.CpuUsage}%."));
}
}
}

0 comments on commit 1c23969

Please sign in to comment.