7 implementations of Resources
Microsoft.Extensions.Diagnostics.ResourceMonitoring (3)
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (4)
11 references to Resources
Microsoft.Extensions.Diagnostics.ResourceMonitoring (1)
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (10)
Linux\AcceptanceTest.cs (9)
36Assert.NotEqual(default, provider.Resources);
132Assert.Equal(1, provider.Resources.GuaranteedCpuUnits); // hack to make hardcoded calculation in resource utilization main package work.
133Assert.Equal(2.0d, provider.Resources.MaximumCpuUnits); // read from cpuset.cpus
134Assert.Equal(100_000UL, provider.Resources.GuaranteedMemoryInBytes); // read from memory.limit_in_bytes
138Assert.Equal(100_000UL, provider.Resources.MaximumMemoryInBytes);
180Assert.Equal(0.1, Math.Round(provider.Resources.GuaranteedCpuUnits, 1)); // hack to make hardcoded calculation in resource utilization main package work.
181Assert.Equal(0.2d, Math.Round(provider.Resources.MaximumCpuUnits, 1)); // read from cpuset.cpus
182Assert.Equal(100_000UL, provider.Resources.GuaranteedMemoryInBytes); // read from memory.max
186Assert.Equal(100_000UL, provider.Resources.MaximumMemoryInBytes);