@Override public void mark() { meter.markEvent(); }
@Override public double get() { return meter.getRate(); } };
@Override public long getCount() { return meter.getCount(); } }
@Override public Number getMetricValue() { return meter.getRate(); } }
@Override public long getCount() { return meter.getCount(); }
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(); }
@Override public double getRate() { return meter.getRate(); }
@Test public void testGetCount() { Counter c = new SimpleCounter(); c.inc(5); Meter m = new MeterView(c, 60); assertEquals(5, m.getCount()); }
@Override public void mark(long n) { meter.markEvent(n); }
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(); }
@Override public double getOneMinuteRate() { return meter.getRate(); }
@Override public long getCount() { return meter.getCount(); } }
@Override public void mark() { meter.markEvent(); }
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(); }
for (Map.Entry<Meter, String> metric : meters.entrySet()) { builder .append(metric.getValue()).append(": ").append(metric.getKey().getRate()) .append(lineSeparator);
@Override public long getCount() { return meter.getCount(); }
@Override public void mark(long n) { meter.markEvent(n); }
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(); }