Пример #1
0
 public static void GaugeAbsoluteValue(this IStatsClient stats, string name, int value)
 {
     if (value < 0)
     {
         stats.Send(
             new Metric(name, MetricValue.Gauge(0)),
             new Metric(name, MetricValue.Delta(value)));
     }
     else
     {
         stats.Send(new Metric(name, MetricValue.Gauge((uint)value)));
     }
 }
Пример #2
0
 public void Send(Metric metric) => inner.Send(new Metric(prefix + metric.Name, metric.Value));
Пример #3
0
 public static void GaugeDelta(this IStatsClient stats, string name, int value) => stats.Send(new Metric(name, MetricValue.Delta(value)));
Пример #4
0
 public static void Timer(this IStatsClient stats, string name, ulong value) =>
 stats.Send(new Metric(name, MetricValue.Time(value)));
Пример #5
0
 public static void Counter(this IStatsClient stats, string name, int count) =>
 stats.Send(new Metric(name, MetricValue.Counter(count)));
Пример #6
0
 public static void Counter(this IStatsClient stats, string name) => stats.Send(new Metric(name, CountOfOne));
Пример #7
0
 public static void Send(this IStatsClient stats, params Metric[] metrics) => stats.Send(metrics);
Пример #8
0
 public static void Send(this IStatsClient stats, string name, MetricValue value) => stats.Send(new Metric(name, value));