1 instantiation of CollectedMeasurement
Microsoft.Extensions.Diagnostics.Testing (1)
64 references to CollectedMeasurement
InMemory.FunctionalTests (4)
KestrelMetricsTests.cs (3)
757static void AssertRequestCount(CollectedMeasurement<long> measurement, long expectedValue, string httpVersion)
930private static void AssertDuration(CollectedMeasurement<double> measurement, string localAddress, int? localPort, string networkTransport, string networkType, string httpVersion, string tlsProtocolVersion = null, string error = null)
986private static void AssertCount(CollectedMeasurement<long> measurement, long expectedValue, string localAddress, int? localPort, string networkTransport, string networkType)
Microsoft.AspNetCore.Diagnostics.Tests (2)
Microsoft.AspNetCore.HeaderParsing.Tests (2)
Microsoft.AspNetCore.Hosting.Tests (1)
Microsoft.AspNetCore.Http.Connections.Tests (2)
Microsoft.AspNetCore.RateLimiting.Tests (2)
Microsoft.AspNetCore.Routing.Tests (2)
Microsoft.Extensions.Diagnostics.HealthChecks.Common.Tests (3)
Microsoft.Extensions.Diagnostics.Testing (25)
Metrics\MeasurementExtensions.cs (20)
22public static IEnumerable<CollectedMeasurement<T>> ContainsTags<T>(this IEnumerable<CollectedMeasurement<T>> measurements, params KeyValuePair<string, object?>[] tags)
33public static IEnumerable<CollectedMeasurement<T>> ContainsTags<T>(this IEnumerable<CollectedMeasurement<T>> measurements, params string[] tags)
44public static IEnumerable<CollectedMeasurement<T>> MatchesTags<T>(this IEnumerable<CollectedMeasurement<T>> measurements, params KeyValuePair<string, object?>[] tags)
55public static IEnumerable<CollectedMeasurement<T>> MatchesTags<T>(this IEnumerable<CollectedMeasurement<T>> measurements, params string[] tags)
65public static T EvaluateAsCounter<T>(this IEnumerable<CollectedMeasurement<T>> measurements)
71IEnumerable<CollectedMeasurement<byte>> l => (T)(object)ByteSum(l),
72IEnumerable<CollectedMeasurement<short>> l => (T)(object)ShortSum(l),
73IEnumerable<CollectedMeasurement<int>> l => (T)(object)l.Sum(m => m.Value),
74IEnumerable<CollectedMeasurement<long>> l => (T)(object)l.Sum(m => m.Value),
75IEnumerable<CollectedMeasurement<float>> l => (T)(object)l.Sum(m => m.Value),
76IEnumerable<CollectedMeasurement<double>> l => (T)(object)l.Sum(m => m.Value),
77IEnumerable<CollectedMeasurement<decimal>> l => (T)(object)l.Sum(m => m.Value),
81static byte ByteSum(IEnumerable<CollectedMeasurement<byte>> measurements)
84foreach (var measurement in measurements)
92static short ShortSum(IEnumerable<CollectedMeasurement<short>> measurements)
95foreach (var measurement in measurements)
Microsoft.Gen.Metrics.Generated.Tests (20)
Sockets.FunctionalTests (1)