106 references to GetMeasurementSnapshot
Microsoft.Extensions.AI.Tests (4)
ChatCompletion\OpenTelemetryChatClientTests.cs (4)
929var ttfcMeasurements = timeToFirstChunkCollector.GetMeasurementSnapshot(); 941var tpocMeasurements = timePerOutputChunkCollector.GetMeasurementSnapshot(); 985Assert.Empty(timeToFirstChunkCollector.GetMeasurementSnapshot()); 986Assert.Empty(timePerOutputChunkCollector.GetMeasurementSnapshot());
Microsoft.Extensions.Diagnostics.HealthChecks.Common.Tests (1)
TelemetryHealthChecksPublisherTests.cs (1)
116var unhealthyCounters = unhealthyMetricCollector.GetMeasurementSnapshot();
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (11)
Windows\Disk\WindowsDiskMetricsTests.cs (8)
85IReadOnlyList<CollectedMeasurement<long>> measurements = operationCollector.GetMeasurementSnapshot(); 95measurements = operationCollector.GetMeasurementSnapshot(); 104measurements = operationCollector.GetMeasurementSnapshot(); 113measurements = operationCollector.GetMeasurementSnapshot(); 159IReadOnlyList<CollectedMeasurement<long>> measurements = operationCollector.GetMeasurementSnapshot(); 169measurements = operationCollector.GetMeasurementSnapshot(); 178measurements = operationCollector.GetMeasurementSnapshot(); 187measurements = operationCollector.GetMeasurementSnapshot();
Windows\WindowsContainerSnapshotProviderTests.cs (3)
233var snapshot = metricCollector.GetMeasurementSnapshot(); 241snapshot = metricCollector.GetMeasurementSnapshot(); 248snapshot = metricCollector.GetMeasurementSnapshot();
Microsoft.Extensions.Diagnostics.Testing.Tests (39)
Metrics\MeasurementExtensionsTests.cs (11)
25var fullSnap = collector.GetMeasurementSnapshot(); 50var fullSnap = collector.GetMeasurementSnapshot(); 75var fullSnap = collector.GetMeasurementSnapshot(); 103var fullSnap = collector.GetMeasurementSnapshot(); 135var fullSnap = collector.GetMeasurementSnapshot(); 152var fullSnap = collector.GetMeasurementSnapshot(); 169var fullSnap = collector.GetMeasurementSnapshot(); 186var fullSnap = collector.GetMeasurementSnapshot(); 203var fullSnap = collector.GetMeasurementSnapshot(); 220var fullSnap = collector.GetMeasurementSnapshot(); 237var fullSnap = collector.GetMeasurementSnapshot();
Metrics\MetricCollectorTests.cs (28)
52Assert.Empty(collector.GetMeasurementSnapshot()); 63Assert.Single(collector.GetMeasurementSnapshot()); 64Assert.Same(collector.GetMeasurementSnapshot().Last(), collector.LastMeasurement); 73Assert.Equal(2, collector.GetMeasurementSnapshot().Count); 74Assert.Same(collector.GetMeasurementSnapshot().Last(), collector.LastMeasurement); 81Assert.Empty(collector.GetMeasurementSnapshot()); 98Assert.Empty(collector.GetMeasurementSnapshot()); 108Assert.Single(collector.GetMeasurementSnapshot()); 109Assert.Same(collector.GetMeasurementSnapshot().Last(), collector.LastMeasurement); 118Assert.Equal(2, collector.GetMeasurementSnapshot().Count); 119Assert.Same(collector.GetMeasurementSnapshot().Last(), collector.LastMeasurement); 126Assert.Empty(collector.GetMeasurementSnapshot()); 145Assert.Empty(collector.GetMeasurementSnapshot()); 155Assert.Single(collector.GetMeasurementSnapshot()); 156Assert.Same(collector.GetMeasurementSnapshot().Last(), collector.LastMeasurement); 165Assert.Equal(2, collector.GetMeasurementSnapshot().Count); 166Assert.Same(collector.GetMeasurementSnapshot().Last(), collector.LastMeasurement); 173Assert.Empty(collector.GetMeasurementSnapshot()); 206Assert.Empty(collector.GetMeasurementSnapshot()); 216Assert.Single(collector.GetMeasurementSnapshot()); 217Assert.Same(collector.GetMeasurementSnapshot().Last(), collector.LastMeasurement); 226Assert.Equal(2, collector.GetMeasurementSnapshot().Count); 227Assert.Same(collector.GetMeasurementSnapshot().Last(), collector.LastMeasurement); 361Assert.Throws<ObjectDisposedException>(() => collector.GetMeasurementSnapshot()); 398var snap = collector.GetMeasurementSnapshot(); 400Assert.Equal(3, collector.GetMeasurementSnapshot().Count); 414snap = collector.GetMeasurementSnapshot(true); 416Assert.Empty(collector.GetMeasurementSnapshot());
Microsoft.Gen.Metrics.Generated.Tests (51)
MetricTests.cs (28)
55var measurements = collector.GetMeasurementSnapshot(); 69var measurement = Assert.Single(collector.GetMeasurementSnapshot()); 82var measurements = collector.GetMeasurementSnapshot(); 96var measurement = Assert.Single(collector.GetMeasurementSnapshot()); 110var measurements = collector.GetMeasurementSnapshot(); 124var measurement = Assert.Single(collector.GetMeasurementSnapshot()); 138var measurements = collector.GetMeasurementSnapshot(); 152var measurement = Assert.Single(collector.GetMeasurementSnapshot()); 170var measurements = collector.GetMeasurementSnapshot(); 194var measurements = collector.GetMeasurementSnapshot(); 251var measurement = Assert.Single(collector.GetMeasurementSnapshot()); 257measurement = Assert.Single(collector.GetMeasurementSnapshot()); 264measurement = Assert.Single(collector.GetMeasurementSnapshot()); 276var measurement = Assert.Single(collector.GetMeasurementSnapshot()); 282measurement = Assert.Single(collector.GetMeasurementSnapshot()); 289measurement = Assert.Single(collector.GetMeasurementSnapshot()); 301var measurement = Assert.Single(collector.GetMeasurementSnapshot()); 314var measurement = Assert.Single(collector.GetMeasurementSnapshot()); 327var measurement = Assert.Single(collector.GetMeasurementSnapshot()); 340var measurement = Assert.Single(collector.GetMeasurementSnapshot()); 361var measurement = Assert.Single(collector.GetMeasurementSnapshot()); 405var measurement = Assert.Single(collector.GetMeasurementSnapshot()); 428measurement = Assert.Single(collector.GetMeasurementSnapshot()); 451measurement = Assert.Single(collector.GetMeasurementSnapshot()); 504var measurement = Assert.Single(collector.GetMeasurementSnapshot()); 548var measurement = Assert.Single(collector.GetMeasurementSnapshot()); 571measurement = Assert.Single(collector.GetMeasurementSnapshot()); 593measurement = Assert.Single(collector.GetMeasurementSnapshot());
MetricTests.Ext.cs (14)
41var measurements = collector.GetMeasurementSnapshot(); 53var measurement = Assert.Single(collector.GetMeasurementSnapshot()); 66var measurements = collector.GetMeasurementSnapshot(); 79var measurement = Assert.Single(collector.GetMeasurementSnapshot()); 93var measurements = collector.GetMeasurementSnapshot(); 106var measurement = Assert.Single(collector.GetMeasurementSnapshot()); 120var measurements = collector.GetMeasurementSnapshot(); 133var measurement = Assert.Single(collector.GetMeasurementSnapshot()); 168var measurement = Assert.Single(collector.GetMeasurementSnapshot()); 190measurement = Assert.Single(collector.GetMeasurementSnapshot()); 212measurement = Assert.Single(collector.GetMeasurementSnapshot()); 261var measurement = Assert.Single(collector.GetMeasurementSnapshot()); 283measurement = Assert.Single(collector.GetMeasurementSnapshot()); 305measurement = Assert.Single(collector.GetMeasurementSnapshot());
MetricTests.Ext.Unit.cs (9)
21var measurement = Assert.Single(collector.GetMeasurementSnapshot()); 36var measurement = Assert.Single(collector.GetMeasurementSnapshot()); 54var measurement = Assert.Single(collector.GetMeasurementSnapshot()); 74var measurement = Assert.Single(collector.GetMeasurementSnapshot()); 99var measurement = Assert.Single(collector.GetMeasurementSnapshot()); 129var measurement = Assert.Single(collector.GetMeasurementSnapshot()); 152var measurement = Assert.Single(collector.GetMeasurementSnapshot()); 169var measurement = Assert.Single(collector.GetMeasurementSnapshot()); 186var measurement = Assert.Single(collector.GetMeasurementSnapshot());