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))); } }
public void Send(Metric metric) => inner.Send(new Metric(prefix + metric.Name, metric.Value));
public static void GaugeDelta(this IStatsClient stats, string name, int value) => stats.Send(new Metric(name, MetricValue.Delta(value)));
public static void Timer(this IStatsClient stats, string name, ulong value) => stats.Send(new Metric(name, MetricValue.Time(value)));
public static void Counter(this IStatsClient stats, string name, int count) => stats.Send(new Metric(name, MetricValue.Counter(count)));
public static void Counter(this IStatsClient stats, string name) => stats.Send(new Metric(name, CountOfOne));
public static void Send(this IStatsClient stats, params Metric[] metrics) => stats.Send(metrics);
public static void Send(this IStatsClient stats, string name, MetricValue value) => stats.Send(new Metric(name, value));