public static DoubleMetric MetricFromEmpty <S, T>(Analyzer <S, T> analyzer, string name, string instance,
                                                          MetricEntity metricEntity = MetricEntity.Column) where S : State <S>, IState where T : IMetric
        {
            EmptyStateException emptyState =
                new EmptyStateException($"Empty state for analyzer {analyzer}, all input values were NULL.");

            return(DoubleMetric.Create(metricEntity, name, instance,
                                       new Try <double>(ExceptionExt.WrapIfNecessary(emptyState))));
        }
 public static DoubleMetric MetricFromFailure(Exception exception, string name, string instance,
                                              MetricEntity metricEntity = MetricEntity.Column) =>
 DoubleMetric.Create(metricEntity, name, instance,
                     new Try <double>(ExceptionExt.WrapIfNecessary(exception)));