Example #1
0
 @Override
 public boolean equals(Object obj) {
   if (obj instanceof MetricsInfo) {
     MetricsInfo other = (MetricsInfo) obj;
     return Objects.equal(name, other.name()) && Objects.equal(description, other.description());
   }
   return false;
 }
 @Override
 public MetricsRecordBuilder addGauge(MetricsInfo metricsInfo, int i) {
   gauges.put(canonicalizeMetricName(metricsInfo.name()), Long.valueOf(i));
   return this;
 }
 @Override
 public MetricsRecordBuilder addCounter(MetricsInfo metricsInfo, long l) {
   counters.put(canonicalizeMetricName(metricsInfo.name()), Long.valueOf(l));
   return this;
 }
    @Override
    public MetricsRecordBuilder tag(MetricsInfo metricsInfo, String s) {

      tags.put(canonicalizeMetricName(metricsInfo.name()), s);
      return this;
    }
 @Override
 public MetricsRecordBuilder addGauge(MetricsInfo metricsInfo, double v) {
   gauges.put(canonicalizeMetricName(metricsInfo.name()), Double.valueOf(v));
   return this;
 }
Example #6
0
 public MutableRangeHistogram(MetricsInfo info) {
   this(info.name(), info.description());
 }