34 instantiations of Measurement
Aspire.Confluent.Kafka (3)
MetricsService.cs (3)
46
metrics.ReplyQueueMeasurements.Enqueue(new
Measurement
<long>(statistics.ReplyQueue, tags));
47
metrics.MessageCountMeasurements.Enqueue(new
Measurement
<long>(statistics.MessageCount, tags));
48
metrics.MessageSizeMeasurements.Enqueue(new
Measurement
<long>(statistics.MessageSize, tags));
Interop.FunctionalTests (1)
Http2\Http2RequestTests.cs (1)
55
measurementTcs.SetResult(new
Measurement
<double>(measurement, tags));
Microsoft.Extensions.Diagnostics.ResourceMonitoring (24)
Windows\Network\WindowsNetworkMetrics.cs (24)
51
measurements.Add(new
Measurement
<long>(stateV4.ClosedCount, new TagList { tcpVersionFourTag, new(NetworkStateKey, "close") }));
52
measurements.Add(new
Measurement
<long>(stateV4.ListenCount, new TagList { tcpVersionFourTag, new(NetworkStateKey, "listen") }));
53
measurements.Add(new
Measurement
<long>(stateV4.SynSentCount, new TagList { tcpVersionFourTag, new(NetworkStateKey, "syn_sent") }));
54
measurements.Add(new
Measurement
<long>(stateV4.SynRcvdCount, new TagList { tcpVersionFourTag, new(NetworkStateKey, "syn_recv") }));
55
measurements.Add(new
Measurement
<long>(stateV4.EstabCount, new TagList { tcpVersionFourTag, new(NetworkStateKey, "established") }));
56
measurements.Add(new
Measurement
<long>(stateV4.FinWait1Count, new TagList { tcpVersionFourTag, new(NetworkStateKey, "fin_wait_1") }));
57
measurements.Add(new
Measurement
<long>(stateV4.FinWait2Count, new TagList { tcpVersionFourTag, new(NetworkStateKey, "fin_wait_2") }));
58
measurements.Add(new
Measurement
<long>(stateV4.CloseWaitCount, new TagList { tcpVersionFourTag, new(NetworkStateKey, "close_wait") }));
59
measurements.Add(new
Measurement
<long>(stateV4.ClosingCount, new TagList { tcpVersionFourTag, new(NetworkStateKey, "closing") }));
60
measurements.Add(new
Measurement
<long>(stateV4.LastAckCount, new TagList { tcpVersionFourTag, new(NetworkStateKey, "last_ack") }));
61
measurements.Add(new
Measurement
<long>(stateV4.TimeWaitCount, new TagList { tcpVersionFourTag, new(NetworkStateKey, "time_wait") }));
62
measurements.Add(new
Measurement
<long>(stateV4.DeleteTcbCount, new TagList { tcpVersionFourTag, new(NetworkStateKey, "delete") }));
66
measurements.Add(new
Measurement
<long>(stateV6.ClosedCount, new TagList { tcpVersionSixTag, new(NetworkStateKey, "close") }));
67
measurements.Add(new
Measurement
<long>(stateV6.ListenCount, new TagList { tcpVersionSixTag, new(NetworkStateKey, "listen") }));
68
measurements.Add(new
Measurement
<long>(stateV6.SynSentCount, new TagList { tcpVersionSixTag, new(NetworkStateKey, "syn_sent") }));
69
measurements.Add(new
Measurement
<long>(stateV6.SynRcvdCount, new TagList { tcpVersionSixTag, new(NetworkStateKey, "syn_recv") }));
70
measurements.Add(new
Measurement
<long>(stateV6.EstabCount, new TagList { tcpVersionSixTag, new(NetworkStateKey, "established") }));
71
measurements.Add(new
Measurement
<long>(stateV6.FinWait1Count, new TagList { tcpVersionSixTag, new(NetworkStateKey, "fin_wait_1") }));
72
measurements.Add(new
Measurement
<long>(stateV6.FinWait2Count, new TagList { tcpVersionSixTag, new(NetworkStateKey, "fin_wait_2") }));
73
measurements.Add(new
Measurement
<long>(stateV6.CloseWaitCount, new TagList { tcpVersionSixTag, new(NetworkStateKey, "close_wait") }));
74
measurements.Add(new
Measurement
<long>(stateV6.ClosingCount, new TagList { tcpVersionSixTag, new(NetworkStateKey, "closing") }));
75
measurements.Add(new
Measurement
<long>(stateV6.LastAckCount, new TagList { tcpVersionSixTag, new(NetworkStateKey, "last_ack") }));
76
measurements.Add(new
Measurement
<long>(stateV6.TimeWaitCount, new TagList { tcpVersionSixTag, new(NetworkStateKey, "time_wait") }));
77
measurements.Add(new
Measurement
<long>(stateV6.DeleteTcbCount, new TagList { tcpVersionSixTag, new(NetworkStateKey, "delete") }));
Stress.ApiService (1)
TestMetrics.cs (1)
51
return new
Measurement
<double>(sum / uploadSpeed.Count);
Stress.TelemetryService (1)
GaugeMetrics.cs (1)
28
measurements.Add(new
Measurement
<long>(workingSet, new KeyValuePair<string, object?>("process.id", process.Id)));
System.Diagnostics.DiagnosticSource (4)
System\Diagnostics\Metrics\ObservableInstrument.cs (1)
76
return new Measurement<T>[1] { new
Measurement
<T>(valueOnlyFunc()) };
System\Diagnostics\Metrics\RuntimeMetrics.cs (3)
166
yield return
new
(collectionsFromThisGeneration - collectionsFromHigherGeneration, new KeyValuePair<string, object?>("gc.heap.generation", s_genNames[gen]));
191
yield return
new
(gcInfo.GenerationInfo[i].SizeAfterBytes, new KeyValuePair<string, object?>("gc.heap.generation", s_genNames[i]));
201
yield return
new
(gcInfo.GenerationInfo[i].FragmentationAfterBytes, new KeyValuePair<string, object?>("gc.heap.generation", s_genNames[i]));
58 references to Measurement
Aspire.Confluent.Kafka (12)
ConfluentKafkaMetrics.cs (12)
22
public ConcurrentQueue<
Measurement
<long>> ReplyQueueMeasurements { get; } = new ConcurrentQueue<
Measurement
<long>>();
23
public ConcurrentQueue<
Measurement
<long>> MessageCountMeasurements { get; } = new ConcurrentQueue<
Measurement
<long>>();
24
public ConcurrentQueue<
Measurement
<long>> MessageSizeMeasurements { get; } = new ConcurrentQueue<
Measurement
<long>>();
85
private IEnumerable<
Measurement
<long>> GetReplyQMeasurements()
87
while (ReplyQueueMeasurements.TryDequeue(out
var
measurement))
93
private IEnumerable<
Measurement
<long>> GetMessageCountMeasurements()
95
while (MessageCountMeasurements.TryDequeue(out
var
measurement))
101
private IEnumerable<
Measurement
<long>> GetMessageSizeMeasurements()
103
while (MessageSizeMeasurements.TryDequeue(out
var
measurement))
Interop.FunctionalTests (2)
Http2\Http2RequestTests.cs (2)
44
var measurementTcs = new TaskCompletionSource<
Measurement
<double>>();
72
var
measurement = await measurementTcs.Task.DefaultTimeout();
Microsoft.Extensions.Diagnostics.ResourceMonitoring (2)
Windows\Network\WindowsNetworkMetrics.cs (2)
38
private IEnumerable<
Measurement
<long>> GetMeasurements()
47
List<
Measurement
<long>> measurements = new(24);
Stress.TelemetryService (1)
GaugeMetrics.cs (1)
22
var measurements = new List<
Measurement
<long>>();
System.Diagnostics.DiagnosticSource (41)
System\Diagnostics\Metrics\Measurement.cs (2)
11
/// <see cref="
Measurement
{T}"/> stores one observed value and its associated tags for a metric.
19
/// Initializes a new instance of <see cref="
Measurement
{T}"/> with the provided <paramref name="value"/>.
System\Diagnostics\Metrics\Meter.cs (12)
290
public ObservableUpDownCounter<T> CreateObservableUpDownCounter<T>(string name, Func<
Measurement
<T>> observeValue, string? unit = null, string? description = null) where T : struct =>
304
public ObservableUpDownCounter<T> CreateObservableUpDownCounter<T>(string name, Func<
Measurement
<T>> observeValue, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) where T : struct =>
317
public ObservableUpDownCounter<T> CreateObservableUpDownCounter<T>(string name, Func<IEnumerable<
Measurement
<T>>> observeValues, string? unit = null, string? description = null) where T : struct =>
331
public ObservableUpDownCounter<T> CreateObservableUpDownCounter<T>(string name, Func<IEnumerable<
Measurement
<T>>> observeValues, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) where T : struct =>
371
public ObservableCounter<T> CreateObservableCounter<T>(string name, Func<
Measurement
<T>> observeValue, string? unit = null, string? description = null) where T : struct =>
385
public ObservableCounter<T> CreateObservableCounter<T>(string name, Func<
Measurement
<T>> observeValue, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) where T : struct =>
399
public ObservableCounter<T> CreateObservableCounter<T>(string name, Func<IEnumerable<
Measurement
<T>>> observeValues, string? unit = null, string? description = null) where T : struct =>
413
public ObservableCounter<T> CreateObservableCounter<T>(string name, Func<IEnumerable<
Measurement
<T>>> observeValues, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) where T : struct =>
444
public ObservableGauge<T> CreateObservableGauge<T>(string name, Func<
Measurement
<T>> observeValue, string? unit = null, string? description = null) where T : struct =>
455
public ObservableGauge<T> CreateObservableGauge<T>(string name, Func<
Measurement
<T>> observeValue, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) where T : struct =>
465
public ObservableGauge<T> CreateObservableGauge<T>(string name, Func<IEnumerable<
Measurement
<T>>> observeValues, string? unit = null, string? description = null) where T : struct =>
476
public ObservableGauge<T> CreateObservableGauge<T>(string name, Func<IEnumerable<
Measurement
<T>>> observeValues, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) where T : struct =>
System\Diagnostics\Metrics\ObservableCounter.cs (5)
30
internal ObservableCounter(Meter meter, string name, Func<
Measurement
<T>> observeValue, string? unit, string? description) : this(meter, name, observeValue, unit, description, tags: null)
34
internal ObservableCounter(Meter meter, string name, Func<
Measurement
<T>> observeValue, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) : base(meter, name, unit, description, tags)
40
internal ObservableCounter(Meter meter, string name, Func<IEnumerable<
Measurement
<T>>> observeValues, string? unit, string? description) : this(meter, name, observeValues, unit, description, tags: null)
44
internal ObservableCounter(Meter meter, string name, Func<IEnumerable<
Measurement
<T>>> observeValues, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) : base(meter, name, unit, description, tags)
53
protected override IEnumerable<
Measurement
<T>> Observe() => Observe(_callback);
System\Diagnostics\Metrics\ObservableGauge.cs (5)
30
internal ObservableGauge(Meter meter, string name, Func<
Measurement
<T>> observeValue, string? unit, string? description) : this(meter, name, observeValue, unit, description, tags: null)
34
internal ObservableGauge(Meter meter, string name, Func<
Measurement
<T>> observeValue, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) : base(meter, name, unit, description, tags)
40
internal ObservableGauge(Meter meter, string name, Func<IEnumerable<
Measurement
<T>>> observeValues, string? unit, string? description) : this(meter, name, observeValues, unit, description, tags: null)
44
internal ObservableGauge(Meter meter, string name, Func<IEnumerable<
Measurement
<T>>> observeValues, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) : base(meter, name, unit, description, tags)
53
protected override IEnumerable<
Measurement
<T>> Observe() => Observe(_callback);
System\Diagnostics\Metrics\ObservableInstrument.cs (8)
46
protected abstract IEnumerable<
Measurement
<T>> Observe();
58
IEnumerable<
Measurement
<T>> measurements = Observe();
64
foreach (
Measurement
<T> measurement in measurements)
72
internal static IEnumerable<
Measurement
<T>> Observe(object callback)
76
return new
Measurement
<T>[1] { new Measurement<T>(valueOnlyFunc()) };
79
if (callback is Func<
Measurement
<T>> measurementOnlyFunc)
81
return new
Measurement
<T>[1] { measurementOnlyFunc() };
84
if (callback is Func<IEnumerable<
Measurement
<T>>> listOfMeasurementsFunc)
System\Diagnostics\Metrics\ObservableUpDownCounter.cs (5)
30
internal ObservableUpDownCounter(Meter meter, string name, Func<
Measurement
<T>> observeValue, string? unit, string? description) : this(meter, name, observeValue, unit, description, tags: null)
34
internal ObservableUpDownCounter(Meter meter, string name, Func<
Measurement
<T>> observeValue, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) : base(meter, name, unit, description, tags)
40
internal ObservableUpDownCounter(Meter meter, string name, Func<IEnumerable<
Measurement
<T>>> observeValues, string? unit, string? description) : this(meter, name, observeValues, unit, description, tags: null)
44
internal ObservableUpDownCounter(Meter meter, string name, Func<IEnumerable<
Measurement
<T>>> observeValues, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) : base(meter, name, unit, description, tags)
53
protected override IEnumerable<
Measurement
<T>> Observe() => Observe(_callback);
System\Diagnostics\Metrics\RuntimeMetrics.cs (4)
159
private static IEnumerable<
Measurement
<long>> GetGarbageCollectionCounts()
175
private static IEnumerable<
Measurement
<double>> GetCpuTime()
185
private static IEnumerable<
Measurement
<long>> GetHeapSizes()
195
private static IEnumerable<
Measurement
<long>> GetHeapFragmentation()