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