1 write to CpuUsedPercentage
Microsoft.Extensions.Diagnostics.ResourceMonitoring (1)
ResourceUtilization.cs (1)
65
CpuUsedPercentage
= Math.Min(Hundred, Throw.IfLessThan(cpuUsedPercentage / guaranteedCpuUnits, 0.0));
16 references to CpuUsedPercentage
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (16)
CalculatorTests.cs (6)
48
Assert.Equal(50.0, record.
CpuUsedPercentage
);
84
Assert.Equal(100.0, record.
CpuUsedPercentage
);
104
Assert.Equal(0.0, record.
CpuUsedPercentage
);
134
Assert.Equal(0.0, record.
CpuUsedPercentage
);
157
Assert.Equal(100.0, record.
CpuUsedPercentage
);
191
Assert.Equal(expectedCpuUsage, record.
CpuUsedPercentage
);
IResourceUtilizationTrackerTests.cs (1)
17
Assert.Equal(DummyTracker.CpuPercentage, utilization.
CpuUsedPercentage
);
Linux\AcceptanceTest.cs (6)
246
Assert.Equal(0, utilization.
CpuUsedPercentage
);
264
Assert.Equal(1, utilization.
CpuUsedPercentage
);
267
Assert.Equal(utilization.
CpuUsedPercentage
, cpuRequestFromGauge * 100);
269
Assert.Equal(utilization.
CpuUsedPercentage
, cpuFromGauge * 100);
330
Assert.Equal(0, utilization.
CpuUsedPercentage
);
349
var roundedCpuUsedPercentage = Math.Round(utilization.
CpuUsedPercentage
, 1);
ResourceMonitoringServiceTests.cs (2)
476
cpuValuesWithHighSpikes[i] = (int)utilization.
CpuUsedPercentage
;
580
cpuValuesWithNoHighSpikes[i] = (int)utilization.
CpuUsedPercentage
;
ResourceUtilizationTests.cs (1)
21
Assert.Equal(CpuPercentage, utilization.
CpuUsedPercentage
);