@Test public void jvm_vitals() { uaaMetricsEmitter.emitJvmVitals(); Mockito.verify(statsDClient).gauge(eq("vitals.jvm.cpu.load"), and(geq(0l), leq(100l))); Mockito.verify(statsDClient).gauge(eq("vitals.jvm.thread.count"), and(gt(1l), leq(1000l))); Mockito.verify(statsDClient).gauge(eq("vitals.jvm.heap.init"), gt(0l)); Mockito.verify(statsDClient).gauge(eq("vitals.jvm.heap.committed"), gt(0l)); Mockito.verify(statsDClient).gauge(eq("vitals.jvm.heap.used"), gt(0l)); //Mockito.verify(statsDClient).gauge(eq("vitals.jvm.heap.max"), gt(0l)); Mockito.verify(statsDClient).gauge(eq("vitals.jvm.non-heap.init"), gt(0l)); Mockito.verify(statsDClient).gauge(eq("vitals.jvm.non-heap.committed"), gt(0l)); Mockito.verify(statsDClient).gauge(eq("vitals.jvm.non-heap.used"), gt(0l)); //Mockito.verify(statsDClient).gauge(eq("vitals.jvm.non-heap.max"), gt(0l)); }
/** * Delegates call to {@link AdditionalMatchers#leq(byte)}. */ default byte leq(byte value) { return AdditionalMatchers.leq(value); }
/** * Delegates call to {@link AdditionalMatchers#leq(short)}. */ default short leq(short value) { return AdditionalMatchers.leq(value); }
/** * Delegates call to {@link AdditionalMatchers#leq(double)}. */ default double leq(double value) { return AdditionalMatchers.leq(value); }
/** * Delegates call to {@link AdditionalMatchers#leq(short)}. */ default short leq(short value) { return AdditionalMatchers.leq(value); }
/** * Delegates call to {@link AdditionalMatchers#leq(Comparable)}. */ default <T extends Comparable<T>> T leq(T value) { return AdditionalMatchers.leq(value); }
/** * Delegates call to {@link AdditionalMatchers#leq(float)}. */ default float leq(float value) { return AdditionalMatchers.leq(value); }
/** * Delegates call to {@link AdditionalMatchers#leq(long)}. */ default long leq(long value) { return AdditionalMatchers.leq(value); }
/** * Delegates call to {@link AdditionalMatchers#leq(Comparable)}. */ default <T extends Comparable<T>> T leq(T value) { return AdditionalMatchers.leq(value); }
/** * Delegates call to {@link AdditionalMatchers#leq(byte)}. */ default byte leq(byte value) { return AdditionalMatchers.leq(value); }
/** * Delegates call to {@link AdditionalMatchers#leq(int)}. */ default int leq(int value) { return AdditionalMatchers.leq(value); }
/** * Delegates call to {@link AdditionalMatchers#leq(double)}. */ default double leq(double value) { return AdditionalMatchers.leq(value); }
/** * Delegates call to {@link AdditionalMatchers#leq(int)}. */ default int leq(int value) { return AdditionalMatchers.leq(value); }
/** * Delegates call to {@link AdditionalMatchers#leq(float)}. */ default float leq(float value) { return AdditionalMatchers.leq(value); }
/** * Delegates call to {@link AdditionalMatchers#leq(long)}. */ default long leq(long value) { return AdditionalMatchers.leq(value); }
String d = String.format(desc, percentile); long expected = (long) (q.quantile * 1000); verify(mb).addGauge(eq(info(n, d)), leq(expected + error)); verify(mb).addGauge(eq(info(n, d)), geq(expected - error));
String d = String.format(desc, percentile); long expected = (long) (q.quantile * 1000); verify(mb).addGauge(eq(info(n, d)), leq(expected + error)); verify(mb).addGauge(eq(info(n, d)), geq(expected - error));