protected IMonitor <int> getTotalLatencyPercentileMonitor(string name, double percentile)
 {
     return(ServoMetricFactory.GaugeMetric <int>(this,
                                                 MonitorConfig.builder(name).build(),
                                                 () => metrics.GetTotalTimePercentile(percentile)));
 }
 protected IMonitor <long> getRollingMonitor(string name, HystrixEventType @event)
 {
     return(ServoMetricFactory.GaugeMetric <long>(this,
                                                  MonitorConfig.builder(name).withTag(DataSourceLevel.DEBUG).withTag(ServoTypeTag).withTag(ServoInstanceTag).build(),
                                                  () => metrics.GetRollingCount(@event.ToHystrixRollingNumberEvent())));
 }
 protected IMonitor <int> getTotalLatencyMeanMonitor(string name)
 {
     return(ServoMetricFactory.GaugeMetric <int>(this,
                                                 MonitorConfig.builder(name).build(),
                                                 () => metrics.GetTotalTimeMean()));
 }
 protected IMonitor <T> getCurrentValueMonitor <T>(string name, Func <T> metricToEvaluate, ITag tag)
 {
     return(ServoMetricFactory.GaugeMetric <T>(this, MonitorConfig.builder(name).withTag(tag).build(), metricToEvaluate));
 }