protected internal string GetStatistic(IAggregation agg, IMeasure measure) { var result = agg.Match <string>( (arg) => { return("total"); }, (arg) => { return("count"); }, (arg) => { return("total"); }, (arg) => { return("total"); }, (arg) => { return("value"); }, (arg) => { return("unknown"); }); if (MeasureUnit.IsTimeUnit(measure.Unit) && result == "total") { result = "totalTime"; } return(result); }
protected internal MetricStatistic GetStatistic(IAggregation agg, IMeasure measure) { var result = agg.Match <MetricStatistic>( (arg) => { return(MetricStatistic.TOTAL); }, (arg) => { return(MetricStatistic.COUNT); }, (arg) => { return(MetricStatistic.TOTAL); }, (arg) => { return(MetricStatistic.TOTAL); }, (arg) => { return(MetricStatistic.VALUE); }, (arg) => { return(MetricStatistic.UNKNOWN); }); if (MeasureUnit.IsTimeUnit(measure.Unit) && result == MetricStatistic.TOTAL) { result = MetricStatistic.TOTALTIME; } return(result); }