Ejemplo n.º 1
0
 public static void Send(this GraphiteSender graphiteSender, string name, string value)
 {
     graphiteSender.Send(DateTime.UtcNow, name, value);
 }
Ejemplo n.º 2
0
        private void reportTimer(MetricName name, Timer timer, long timestamp)
        {
            Snapshot snapshot = timer.Snapshot;

            graphite.Send(Prefix(name, "max"), format(convertDuration(snapshot.Max)), timestamp);
            graphite.Send(Prefix(name, "mean"), format(convertDuration(snapshot.Mean)), timestamp);
            graphite.Send(Prefix(name, "min"), format(convertDuration(snapshot.Min)), timestamp);
            graphite.Send(Prefix(name, "stddev"),
                          format(convertDuration(snapshot.StdDev)),
                          timestamp);
            graphite.Send(Prefix(name, "p50"),
                          format(convertDuration(snapshot.Median)),
                          timestamp);
            graphite.Send(Prefix(name, "p75"),
                          format(convertDuration(snapshot.Percentile75th)),
                          timestamp);
            graphite.Send(Prefix(name, "p95"),
                          format(convertDuration(snapshot.Percentile95th)),
                          timestamp);
            graphite.Send(Prefix(name, "p98"),
                          format(convertDuration(snapshot.Percentile98th)),
                          timestamp);
            graphite.Send(Prefix(name, "p99"),
                          format(convertDuration(snapshot.Percentile99th)),
                          timestamp);
            graphite.Send(Prefix(name, "p999"),
                          format(convertDuration(snapshot.Percentile999th)),
                          timestamp);

            reportMetered(name, timer, timestamp);
        }
Ejemplo n.º 3
0
 private void Send(string context, MetricTags tags, GraphiteMetricName name, GraphiteValue value)
 {
     _graphiteSender.Send(_metricNameFormatter.Format(context, tags, name), value.ToString());
 }