Skip to content

Commit

Permalink
Fix load average constants on windows
Browse files Browse the repository at this point in the history
There was an error in the parenthesis during the calculation of this constant, fixing this in the downstream projects where it got propagated to. See
giampaolo/psutil#1552
giampaolo/psutil#1583
  • Loading branch information
ammaraskar committed Jul 2, 2020
1 parent 5a4e8b8 commit 7542a89
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build/powershell/background/initial.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ function Global:Get-Metrics {
## 8 = 4 LA in Linux for a quad core processor, etc.

[Decimal]$LOADAVG_FACTOR_1F = 0.9200444146293232478931553241
[Decimal]$LOADAVG_FACTOR_5F = 0.6592406302004437462547604110
[Decimal]$LOADAVG_FACTOR_15F = 0.2865047968601901003248854266
[Decimal]$LOADAVG_FACTOR_5F = 0.9834714538216174894737477501
[Decimal]$LOADAVG_FACTOR_15F = 0.9944598480048967508795473394
$Length = 0
$CPU = [Decimal[]](Get-CimInstance -className Win32_PerfFormattedData_PerfOS_System).ProcessorQueueLength
$Length += $($CPU | Measure-Object -Sum).Sum
Expand Down

0 comments on commit 7542a89

Please sign in to comment.