public static ApdexMetric ToMetric(this ApdexValueSource source) { return(new ApdexMetric { Name = source.Name, Score = source.Value.Score, SampleSize = source.Value.SampleSize, Satisfied = source.Value.Satisfied, Tolerating = source.Value.Tolerating, Frustrating = source.Value.Frustrating, Tags = source.Tags }); }
public static ApdexMetric ToSerializableMetric(this ApdexValueSource source) { return(new ApdexMetric { Name = source.Name, Score = source.Value.Score, SampleSize = source.Value.SampleSize, Satisfied = source.Value.Satisfied, Tolerating = source.Value.Tolerating, Frustrating = source.Value.Frustrating, Tags = source.Tags.ToDictionary() }); }
public static ApdexMetric ToSerializableMetric(this ApdexValueSource source) { var apdexValue = source.ValueProvider.GetValue(source.ResetOnReporting); return(new ApdexMetric { Name = source.Name, Score = apdexValue.Score, SampleSize = apdexValue.SampleSize, Satisfied = apdexValue.Satisfied, Tolerating = apdexValue.Tolerating, Frustrating = apdexValue.Frustrating, Tags = source.Tags.ToDictionary() }); }