18 references to SystemResources
Microsoft.Extensions.Diagnostics.ResourceMonitoring (3)
Linux\LinuxUtilizationProvider.cs (1)
79Resources = new SystemResources(cpuRequest, cpuLimit, _memoryLimit, _memoryLimit);
Windows\WindowsContainerSnapshotProvider.cs (1)
93Resources = new SystemResources(cpuRequest, _cpuLimit, memoryRequest, memoryLimitLong);
Windows\WindowsSnapshotProvider.cs (1)
65Resources = new SystemResources(_cpuUnits, _cpuUnits, totalMemory, totalMemory);
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (15)
CalculatorTests.cs (3)
23private readonly SystemResources _resources = new(CpuUnits, CpuUnits, TotalMemoryInBytes, TotalMemoryInBytes); 64SystemResources limitedResources = new(guaranteedCpuUnits: 0.5, maximumCpuUnits: 0.5, TotalMemoryInBytes, TotalMemoryInBytes); 174SystemResources limitedResources = new(cpuUnits, cpuUnits, TotalMemoryInBytes, TotalMemoryInBytes);
Helpers\DummyProvider.cs (1)
19public SystemResources Resources => new(
Helpers\DummyTracker.cs (1)
16public ResourceUtilization GetUtilization(TimeSpan aggregationPeriod) => new(CpuPercentage, MemoryUsed, new SystemResources(CpuUnits, CpuUnits, MemoryTotal, MemoryTotal));
Providers\ConditionallyFaultProvider.cs (1)
25public SystemResources Resources => new(CpuUnits, CpuUnits, TotalMemory, TotalMemory);
Providers\FakeProvider.cs (1)
17public SystemResources Resources => new(1.0, 1.0, 1000, 1000);
Providers\FaultProvider.cs (1)
15public SystemResources Resources => new(1.0, 1.0, 1000, 1000);
ResourceMonitoringServiceTests.cs (1)
641.Returns(new SystemResources(1.0, 1.0, 100, 100));
ResourceUtilizationTests.cs (1)
15private readonly SystemResources _systemResources = new(CpuUnits, CpuUnits, MemoryTotal, MemoryTotal);
SystemResourcesTests.cs (5)
17var systemResources = new SystemResources(CpuUnits, CpuUnits, MemoryTotalInBytes, MemoryTotalInBytes); 29Assert.Throws<ArgumentOutOfRangeException>(() => new SystemResources(0.0, 1.0, 1000UL, 1000UL)); 31Assert.Throws<ArgumentOutOfRangeException>(() => new SystemResources(1.0, 0.0, 1000UL, 1000UL)); 34Assert.Throws<ArgumentOutOfRangeException>(() => new SystemResources(1.0, 1.0, 0UL, 1000UL)); 36Assert.Throws<ArgumentOutOfRangeException>(() => new SystemResources(1.0, 1.0, 1000UL, 0UL));