protected MetricValueSource(string name, IMetricValueProvider <T> valueProvider, Unit unit, MetricTags tags) { Name = name; Unit = unit; ValueProvider = valueProvider; Tags = tags; }
public TimerValueSource(string name, IMetricValueProvider <TimerValue> value, Unit unit, TimeUnit rateUnit, TimeUnit durationUnit, MetricTags tags) : base(name, new ScaledValueProvider <TimerValue>(value, v => v.Scale(rateUnit, durationUnit)), unit, tags) { RateUnit = rateUnit; DurationUnit = durationUnit; }
public ApdexValueSource(string name, IMetricValueProvider <ApdexValue> value, MetricTags tags, bool resetOnReporting = false) : base(name, value, Unit.Results, tags) { ResetOnReporting = resetOnReporting; }
public GaugeValueSource( string name, IMetricValueProvider <double> value, Unit unit, MetricTags tags) : base(name, value, unit, tags) { }
public HistogramValueSource( string name, IMetricValueProvider <HistogramValue> valueProvider, Unit unit, MetricTags tags) : base(name, valueProvider, unit, tags) { }
protected MetricValueSourceBase(string name, string group, IMetricValueProvider <T> valueProvider, Unit unit, MetricTags tags) { Name = name; Group = group; Unit = unit; ValueProvider = valueProvider; Tags = tags; }
internal StreamMetric( MetricName metricName, IMetricValueProvider metricValueProvider, MetricConfig config) { this.metricName = metricName; this.metricValueProvider = metricValueProvider; this.config = config; }
public GaugeValueSource( string name, IMetricValueProvider <double> value, Unit unit, MetricTags tags, bool restOnReporting = false) : base(name, value, unit, tags, restOnReporting) { }
public HistogramValueSource( string name, IMetricValueProvider <HistogramValue> valueProvider, Unit unit, MetricTags tags, bool restOnReporting = false) : base(name, valueProvider, unit, tags, restOnReporting) { }
public MeterValueSource( string name, string group, IMetricValueProvider <MeterValue> value, Unit unit, TimeUnit rateUnit, MetricTags tags) : base(name, group, new ScaledValueProvider <MeterValue>(value, v => v.Scale(rateUnit)), unit, tags) { RateUnit = rateUnit; }
/// <summary> /// Initializes a new instance of the <see cref="CounterValueSource" /> class. /// </summary> /// <param name="name">The name.</param> /// <param name="value">The value.</param> /// <param name="unit">The unit.</param> /// <param name="tags">The tags.</param> /// <param name="resetOnReporting">if set to <c>true</c> [reset on reporting]. Defaults to <c>false</c>.</param> /// <param name="reportItemPercentages">if set to <c>true</c> [report item percentages]. Defaults to <c>true</c></param> /// <param name="reportSetItems">if set to <c>true</c> [report set items]. Defaults to <c>true</c></param> public CounterValueSource(string name, IMetricValueProvider <CounterValue> value, Unit unit, MetricTags tags, bool resetOnReporting = false, bool reportItemPercentages = true, bool reportSetItems = true) : base(name, value, unit, tags) { ResetOnReporting = resetOnReporting; ReportItemPercentages = reportItemPercentages; ReportSetItems = reportSetItems; }
public MeterValueSource( string name, IMetricValueProvider <MeterValue> value, Unit unit, TimeUnit rateUnit, MetricTags tags, bool reportSetItems = true) : base(name, new ScaledValueProvider <MeterValue>(value, v => v.Scale(rateUnit)), unit, tags) { RateUnit = rateUnit; ReportSetItems = reportSetItems; }
protected MetricValueSourceBase(string name, IMetricValueProvider <T> valueProvider, Unit unit, MetricTags tags) { Name = name; Unit = unit; ValueProvider = valueProvider; Tags = tags; if (name.Contains(AppMetricsFormattingConstants.MetricName.DimensionSeparator)) { IsMultidimensional = true; MultidimensionalName = name.Split(new[] { AppMetricsFormattingConstants.MetricName.DimensionSeparator }, StringSplitOptions.RemoveEmptyEntries)[0]; } }
public CounterValueSource(string name, IMetricValueProvider <CounterValue> value, Unit unit, MetricTags tags) : base(name, value, unit, tags) { }
public bool Merge(IMetricValueProvider <CounterValue> other) { return(true); }
public ScaledValueProvider(IMetricValueProvider <T> valueProvider, Func <T, T> transformation) { ValueProvider = valueProvider; _scalingFunction = transformation; }
public DerivedGauge(IMetricValueProvider <double> gauge, Func <double, double> transformation) { _gauge = gauge; _transformation = transformation; }