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