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