@Override public double get() { return meter.getRate(); } };
@Override public Number getMetricValue() { return meter.getRate(); } }
@Override public double getRate() { return meter.getRate(); }
@Override public double getOneMinuteRate() { return meter.getRate(); }
private void reportMeter(final String name, final Meter meter) { if (meter != null) { send(prefix(name, "rate"), String.valueOf(meter.getRate())); send(prefix(name, "count"), String.valueOf(meter.getCount())); } }
for (Map.Entry<Meter, String> metric : meters.entrySet()) { builder .append(metric.getValue()).append(": ").append(metric.getKey().getRate()) .append(lineSeparator);
@Override public double getOneMinuteRate() { return meter.getRate(); }
@Override public double getRate() { return meter.getRate(); }
private static void serializeMeter(DataOutput out, QueryScopeInfo info, String name, Meter meter) throws IOException { serializeMetricInfo(out, info); out.writeUTF(name); out.writeDouble(meter.getRate()); }
public IOMetrics(Meter recordsIn, Meter recordsOut, Meter bytesLocalIn, Meter bytesRemoteIn, Meter bytesOut) { this.numRecordsIn = recordsIn.getCount(); this.numRecordsInPerSecond = recordsIn.getRate(); this.numRecordsOut = recordsOut.getCount(); this.numRecordsOutPerSecond = recordsOut.getRate(); this.numBytesInLocal = bytesLocalIn.getCount(); this.numBytesInLocalPerSecond = bytesLocalIn.getRate(); this.numBytesInRemote = bytesRemoteIn.getCount(); this.numBytesInRemotePerSecond = bytesRemoteIn.getRate(); this.numBytesOut = bytesOut.getCount(); this.numBytesOutPerSecond = bytesOut.getRate(); }
private static void serializeMeter(DataOutput out, QueryScopeInfo info, String name, Meter meter) throws IOException { serializeMetricInfo(out, info); out.writeUTF(name); out.writeDouble(meter.getRate()); }
public IOMetrics(Meter recordsIn, Meter recordsOut, Meter bytesLocalIn, Meter bytesRemoteIn, Meter bytesOut) { this.numRecordsIn = recordsIn.getCount(); this.numRecordsInPerSecond = recordsIn.getRate(); this.numRecordsOut = recordsOut.getCount(); this.numRecordsOutPerSecond = recordsOut.getRate(); this.numBytesInLocal = bytesLocalIn.getCount(); this.numBytesInLocalPerSecond = bytesLocalIn.getRate(); this.numBytesInRemote = bytesRemoteIn.getCount(); this.numBytesInRemotePerSecond = bytesRemoteIn.getRate(); this.numBytesOut = bytesOut.getCount(); this.numBytesOutPerSecond = bytesOut.getRate(); }
private static void serializeMeter(DataOutput out, QueryScopeInfo info, String name, Meter meter) throws IOException { serializeMetricInfo(out, info); out.writeUTF(name); out.writeDouble(meter.getRate()); }
public IOMetrics(Meter recordsIn, Meter recordsOut, Meter bytesLocalIn, Meter bytesRemoteIn, Meter bytesOut) { this.numRecordsIn = recordsIn.getCount(); this.numRecordsInPerSecond = recordsIn.getRate(); this.numRecordsOut = recordsOut.getCount(); this.numRecordsOutPerSecond = recordsOut.getRate(); this.numBytesInLocal = bytesLocalIn.getCount(); this.numBytesInLocalPerSecond = bytesLocalIn.getRate(); this.numBytesInRemote = bytesRemoteIn.getCount(); this.numBytesInRemotePerSecond = bytesRemoteIn.getRate(); this.numBytesOut = bytesOut.getCount(); this.numBytesOutPerSecond = bytesOut.getRate(); }
private static void serializeMeter(DataOutput out, QueryScopeInfo info, String name, Meter meter) throws IOException { serializeMetricInfo(out, info); out.writeUTF(name); out.writeDouble(meter.getRate()); }
public IOMetrics(Meter recordsIn, Meter recordsOut, Meter bytesLocalIn, Meter bytesRemoteIn, Meter bytesOut) { this.numRecordsIn = recordsIn.getCount(); this.numRecordsInPerSecond = recordsIn.getRate(); this.numRecordsOut = recordsOut.getCount(); this.numRecordsOutPerSecond = recordsOut.getRate(); this.numBytesInLocal = bytesLocalIn.getCount(); this.numBytesInLocalPerSecond = bytesLocalIn.getRate(); this.numBytesInRemote = bytesRemoteIn.getCount(); this.numBytesInRemotePerSecond = bytesRemoteIn.getRate(); this.numBytesOut = bytesOut.getCount(); this.numBytesOutPerSecond = bytesOut.getRate(); }
public static String toString(Metric metric) { if (metric instanceof Counter) { return Long.toString(((Counter) metric).getCount()); } else if (metric instanceof Gauge) { return ((Gauge) metric).getValue().toString(); } else if (metric instanceof Meter) { return Double.toString(((Meter) metric).getRate()); } else if (metric instanceof Histogram) { HistogramStatistics stats = ((Histogram) metric).getStatistics(); return String.format( "count=%d, min=%d, max=%d, mean=%f, stddev=%f, p50=%f, p75=%f, p95=%f", stats.size(), stats.getMin(), stats.getMax(), stats.getMean(), stats.getStdDev(), stats.getQuantile(0.5), stats.getQuantile(0.75), stats.getQuantile(0.95)); } else { throw new IllegalStateException( String.format( "Cannot remove unknown metric type %s. This indicates that the reporter " + "does not support this metric type.", metric.getClass().getName())); } } }