28 instantiations of Snapshot
Microsoft.Extensions.Diagnostics.ResourceMonitoring (2)
Windows\WindowsContainerSnapshotProvider.cs (1)
127return new Snapshot(
Windows\WindowsSnapshotProvider.cs (1)
95return new Snapshot(
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (26)
CalculatorTests.cs (8)
18private readonly Snapshot _firstSnapshot = new( 36Snapshot second = new( 71Snapshot second = new( 94Snapshot secondSnapshot = new( 121Snapshot firstSnapshot = new( 126Snapshot secondSnapshot = new( 149Snapshot secondSnapshot = new( 180Snapshot secondSnapshot = new(
Helpers\DummyProvider.cs (1)
27return new Snapshot(
Providers\ConditionallyFaultProvider.cs (1)
34return new Snapshot(
Providers\FakeProvider.cs (1)
11private Snapshot _snapshot = new(
Providers\FaultProvider.cs (1)
25return new Snapshot(TimeSpan.FromTicks(_clock.GetUtcNow().Ticks), TimeSpan.Zero, TimeSpan.Zero, ulong.MaxValue);
ResourceMonitoringServiceTests.cs (13)
388var zerosSnapshot = new Snapshot( 402new Snapshot( 407new Snapshot( 412new Snapshot( 417new Snapshot( 422new Snapshot( 495var properInitSnapshot = new Snapshot( 508new Snapshot( 513new Snapshot( 518new Snapshot( 523new Snapshot( 528new Snapshot( 643.Returns(new Snapshot(
SnapshotTests.cs (1)
18var snapshot = new Snapshot(TimeSpan.FromTicks(time.GetUtcNow().Ticks), TimeSpan.Zero, TimeSpan.FromSeconds(1), 10);
37 references to Snapshot
Microsoft.Extensions.Diagnostics.ResourceMonitoring (15)
Calculator.cs (2)
22public static ResourceUtilization CalculateUtilization(in Snapshot first, in Snapshot second, in SystemResources systemResources)
ISnapshotProvider.cs (1)
24Snapshot GetSnapshot();
ResourceMonitorService.cs (6)
46private readonly CircularBuffer<Snapshot> _snapshotsStore; 82var firstSnapshot = _provider.GetSnapshot(); 84_snapshotsStore = new CircularBuffer<Snapshot>(bufferSize + 1, firstSnapshot); 94(Snapshot first, Snapshot last) t; 133var snapshot = _provider.GetSnapshot();
ResourceUtilization.cs (2)
49public Snapshot Snapshot { get; } = default; 78internal ResourceUtilization(double cpuUsedPercentage, ulong memoryUsedInBytes, SystemResources systemResources, Snapshot snapShot)
Snapshot.cs (2)
39/// Initializes a new instance of the <see cref="Snapshot"/> struct. 62/// Initializes a new instance of the <see cref="Snapshot"/> struct.
Windows\WindowsContainerSnapshotProvider.cs (1)
120public Snapshot GetSnapshot()
Windows\WindowsSnapshotProvider.cs (1)
91public Snapshot GetSnapshot()
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (22)
CalculatorTests.cs (8)
18private readonly Snapshot _firstSnapshot = new( 36Snapshot second = new( 71Snapshot second = new( 94Snapshot secondSnapshot = new( 121Snapshot firstSnapshot = new( 126Snapshot secondSnapshot = new( 149Snapshot secondSnapshot = new( 180Snapshot secondSnapshot = new(
Helpers\DummyProvider.cs (1)
25public Snapshot GetSnapshot()
IResourceUtilizationSnapshotProviderTests.cs (1)
24var snapshot = new DummyProvider().GetSnapshot();
Providers\ConditionallyFaultProvider.cs (1)
27public Snapshot GetSnapshot()
Providers\FakeProvider.cs (3)
11private Snapshot _snapshot = new( 19public Snapshot GetSnapshot() 24public void SetNextSnapshot(Snapshot snapshot)
Providers\FaultProvider.cs (1)
17public Snapshot GetSnapshot()
ResourceMonitoringServiceTests.cs (2)
388var zerosSnapshot = new Snapshot( 495var properInitSnapshot = new Snapshot(
ResourceUtilizationTests.cs (1)
25var snap = utilization.Snapshot;
SnapshotTests.cs (1)
18var snapshot = new Snapshot(TimeSpan.FromTicks(time.GetUtcNow().Ticks), TimeSpan.Zero, TimeSpan.FromSeconds(1), 10);
Windows\WindowsContainerSnapshotProviderTests.cs (3)
125var data = source.GetSnapshot(); 149var data = source.GetSnapshot(); 182var data = source.GetSnapshot();