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