1 write to MemoryUsedPercentage
Microsoft.Extensions.Diagnostics.ResourceMonitoring (1)
ResourceUtilization.cs (1)
68MemoryUsedPercentage = Math.Min(Hundred, (double)MemoryUsedInBytes / systemResources.GuaranteedMemoryInBytes * Hundred);
16 references to MemoryUsedPercentage
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (16)
CalculatorTests.cs (4)
51Assert.Equal(50.0, record.MemoryUsedPercentage); 107Assert.Equal(0.0, record.MemoryUsedPercentage); 160Assert.Equal(100.0, record.MemoryUsedPercentage); 194Assert.Equal(100.0, record.MemoryUsedPercentage);
IResourceUtilizationTrackerTests.cs (1)
18Assert.Equal(DummyTracker.MemoryPercentage, utilization.MemoryUsedPercentage);
Linux\AcceptanceTest.cs (10)
247Assert.Equal(100, utilization.MemoryUsedPercentage); 251Assert.Equal(utilization.MemoryUsedPercentage, memoryFromGauge * 100); 265Assert.Equal(50, utilization.MemoryUsedPercentage); 268Assert.Equal(utilization.MemoryUsedPercentage, memoryLimitFromGauge * 100); 270Assert.Equal(utilization.MemoryUsedPercentage, memoryFromGauge * 100); 331Assert.Equal(100, utilization.MemoryUsedPercentage); 335Assert.Equal(utilization.MemoryUsedPercentage, memoryFromGauge * 100); 352Assert.Equal(50, utilization.MemoryUsedPercentage); 355Assert.Equal(utilization.MemoryUsedPercentage, memoryLimitFromGauge * 100); 357Assert.Equal(utilization.MemoryUsedPercentage, memoryFromGauge * 100);
ResourceUtilizationTests.cs (1)
23Assert.Equal(Math.Min(1.0, (double)MemoryUsed / MemoryTotal) * 100.0, utilization.MemoryUsedPercentage);