54 references to MetricCollector
Microsoft.AspNetCore.HeaderParsing.Tests (2)
HeaderParsingFeatureTests.cs (2)
138using var metricCollector = new MetricCollector<long>(meter, "aspnetcore.header_parsing.parse_errors"); 194using var metricCollector = new MetricCollector<long>(meter, "aspnetcore.header_parsing.cache_accesses");
Microsoft.Extensions.Diagnostics.HealthChecks.Common.Tests (2)
TelemetryHealthChecksPublisherTests.cs (2)
88using var healthyMetricCollector = new MetricCollector<long>(meter, HealthReportMetricName); 89using var unhealthyMetricCollector = new MetricCollector<long>(meter, UnhealthyHealthCheckMetricName);
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (4)
Windows\WindowsContainerSnapshotProviderTests.cs (2)
217using var metricCollector = new MetricCollector<double>(meter, instrumentName, fakeClock); 280using var metricCollector = new MetricCollector<double>(meter, instrumentName, fakeClock);
Windows\WindowsSnapshotProviderTests.cs (2)
89using var metricCollector = new MetricCollector<double>(meter, ResourceUtilizationInstruments.ProcessCpuUtilization, fakeClock); 122using var metricCollector = new MetricCollector<double>(meter, ResourceUtilizationInstruments.ProcessMemoryUtilization, fakeClock);
Microsoft.Extensions.Diagnostics.Testing.Tests (12)
Metrics\MetricCollectorTests.cs (12)
21Assert.Throws<ArgumentNullException>(() => new MetricCollector<long>(new Meter(Guid.NewGuid().ToString()), null!)); 22Assert.Throws<ArgumentNullException>(() => new MetricCollector<long>(null!, "Hello")); 25Assert.Throws<ArgumentException>(() => new MetricCollector<long>(new Meter(Guid.NewGuid().ToString()), string.Empty)); 36Assert.Throws<InvalidOperationException>(() => new MetricCollector<Guid>(meter, "Counter")); 49using var collector = new MetricCollector<long>(meter, CounterName, timeProvider); 242using var collector = new MetricCollector<long>(meter, CounterName, timeProvider); 280using var collector = new MetricCollector<long>(meter, CounterName, timeProvider); 306using var collector = new MetricCollector<long>(meter, CounterName, timeProvider); 338using var collector = new MetricCollector<long>(meter, CounterName); 353var collector = new MetricCollector<long>(meter, CounterName, timeProvider); 376collector = new MetricCollector<long>(meter, CounterName, timeProvider); 391using var collector = new MetricCollector<long>(meter, CounterName, timeProvider);
Microsoft.Gen.Metrics.Generated.Tests (34)
MetricTests.cs (22)
50using var collector = new MetricCollector<long>(_meter, nameof(Counter0D)); 65using var collector = new MetricCollector<long>(_meter, nameof(Counter2D)); 77using var collector = new MetricCollector<long>(_meter, nameof(Histogram0D)); 92using var collector = new MetricCollector<long>(_meter, nameof(Histogram1D)); 105using var collector = new MetricCollector<int>(_meter, nameof(GenericIntCounter0D)); 120using var collector = new MetricCollector<int>(_meter, nameof(GenericIntCounter1D)); 133using var collector = new MetricCollector<int>(_meter, nameof(GenericIntHistogram0D)); 148using var collector = new MetricCollector<int>(_meter, nameof(GenericIntHistogram2D)); 162using var collector = new MetricCollector<long>(_meter, nameof(Counter4D)); 186using var collector = new MetricCollector<long>(_meter, nameof(Histogram4D)); 246using var collector = new MetricCollector<long>(_meter, nameof(Counter2D)); 272using var collector = new MetricCollector<long>(_meter, nameof(Histogram2D)); 297using var collector = new MetricCollector<long>(_meter, nameof(FileScopedNamespaceCounter)); 309using var collector = new MetricCollector<double>(_meter, nameof(FileScopedNamespaceGenericDoubleCounter)); 322using var collector = new MetricCollector<long>(_meter, "MyCounterMetric"); 335using var collector = new MetricCollector<long>(_meter, "MyHistogramMetric"); 357using var collector = new MetricCollector<long>(_meter, "MyHistogramStructTypeMetric"); 401using var collector = new MetricCollector<long>(_meter, "MyHistogramStrongTypeMetric"); 473using (var collector = new MetricCollector<long>(_meter, "MyHistogramStrongTypeMetric")) 480using (var collector = new MetricCollector<decimal>(_meter, "MyCounterStrongTypeMetric")) 500using var collector = new MetricCollector<long>(_meter, "MyCounterStructTypeMetric"); 544using var collector = new MetricCollector<decimal>(_meter, "MyCounterStrongTypeMetric");
MetricTests.Ext.cs (12)
18using (var collector = new MetricCollector<long>(_meter, "MyHistogramStrongTypeMetricExt")) 25using (var collector = new MetricCollector<decimal>(_meter, "MyCounterStrongTypeMetricExt")) 36using var collector = new MetricCollector<long>(_meter, nameof(CounterExt0D)); 49using var collector = new MetricCollector<long>(_meter, nameof(CounterExt2D)); 61using var collector = new MetricCollector<long>(_meter, nameof(HistogramExt0D)); 74using var collector = new MetricCollector<long>(_meter, nameof(HistogramExt1D)); 88using var collector = new MetricCollector<int>(_meter, nameof(GenericIntCounterExt0D)); 101using var collector = new MetricCollector<int>(_meter, nameof(GenericIntCounterExt1D)); 115using var collector = new MetricCollector<int>(_meter, nameof(GenericIntHistogramExt0D)); 128using var collector = new MetricCollector<int>(_meter, nameof(GenericIntHistogramExt2D)); 164using var collector = new MetricCollector<long>(_meter, "MyHistogramStrongTypeMetricExt"); 257using var collector = new MetricCollector<decimal>(_meter, "MyCounterStrongTypeMetricExt");