public static HistogramValueSource FromSerializableMetric(this HistogramMetric source) { var histogramValue = new HistogramValue( source.Count, source.LastValue, source.LastUserValue, source.Max, source.MaxUserValue, source.Mean, source.Min, source.MinUserValue, source.StdDev, source.Median, source.Percentile75, source.Percentile95, source.Percentile98, source.Percentile99, source.Percentile999, source.SampleSize); return(new HistogramValueSource( source.Name, source.Group, ConstantValue.Provider(histogramValue), source.Unit, source.Tags.FromDictionary())); }
/// <inheritdoc /> public HistogramValue GetValue(bool resetMetric = false) { var value = new HistogramValue(_last.Value, _last.UserValue, _reservoir.Value.GetSnapshot(resetMetric)); if (resetMetric) { _last = UserValueWrapper.Empty; } return(value); }
public static HistogramValueSource ToMetricValueSource(this HistogramMetric source) { var histogramValue = new HistogramValue( source.Count, source.LastValue, source.LastUserValue, source.Max, source.MaxUserValue, source.Mean, source.Min, source.MinUserValue, source.StdDev, source.Median, source.Percentile75, source.Percentile95, source.Percentile98, source.Percentile99, source.Percentile999, source.SampleSize); return(new HistogramValueSource(source.Name, ConstantValue.Provider(histogramValue), source.Unit, source.Tags)); }