/// <inheritdoc /> public bool IsCounterMatch(CounterValueSource counter) { return(true); }
private static Google.ICanReportToGoogleAnalytics Map(CounterValueSource counter, string context) { return new Google.Counter(FullName(counter.Name, context), counter.Value.Count, counter.Unit.Name); }
public CounterSerializationTests(ITestOutputHelper output, MetricProviderTestFixture fixture) { _output = output; _serializer = new MetricDataSerializer(); _counter = fixture.Counters.First(); }
public bool IsMatch(CounterValueSource counter) { if (types != null && !types.Contains(MetricType.Counter)) { return false; } return IsNameMatch(counter.Name); }
public void Write(StreamWriter streamWriter, MetricsContextValueSource metricContext, CounterValueSource metric) { WriteMetricName(streamWriter, metric.MultidimensionalName); var value = metric.ValueProvider.GetValue(metric.ResetOnReporting); var fullName = GetMetricRow(metricContext.Context, metric.MultidimensionalName, metric.Tags); streamWriter.WriteLine($"{fullName} {value.Count.ToString(CultureInfo.InvariantCulture)}"); }
public bool IsMatch(CounterValueSource counter) { return true; }
internal static void CopyTo(this CounterValueSource source, MetricTelemetry mt) { mt.Sum = source.ValueProvider.GetValue(source.ResetOnReporting).Count; }
public static IEnumerable <(GraphiteMetricName name, GraphiteValue value)> GetCounterItemsToSend(this CounterValueSource valueSource) { var name = valueSource.ToGraphiteName(MetricType.Counter); yield return(valueSource.Value.Items.Any() ? name.WithFolder("Total") : name, valueSource.Value.Count.ToGraphiteValue()); if (!valueSource.ReportSetItems) { yield break; } foreach (var item in valueSource.Value.Items) { yield return(name.WithFolder(item.Item), item.Count.ToGraphiteValue()); if (valueSource.ReportItemPercentages) { yield return(name.WithFolder(item.Item, "Percent"), item.Percent.ToGraphiteValue()); } } }
public bool IsMatch(CounterValueSource counter) { return(false); }
private static Google.ICanReportToGoogleAnalytics Map(CounterValueSource counter, string context) { return(new Google.Counter(FullName(counter.Name, context), counter.Value.Count, counter.Unit.Name)); }