@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)); }
@Test public void perUrlGroup_request_metrics() throws Exception { Mockito.when(metricsUtils.getUaaMetrics(any())).thenReturn(uaaMetrics1); uaaMetricsEmitter.emitUrlGroupRequestMetrics(); Mockito.verify(statsDClient).gauge(eq("requests.ui.completed.count"), gt(0l)); Mockito.verify(statsDClient).gauge(eq("requests.ui.completed.time"), geq(300l)); Mockito.verify(statsDClient).gauge(eq("requests.static-content.completed.count"), gt(0l)); Mockito.verify(statsDClient).gauge(eq("requests.static-content.completed.time"), geq(23l)); }
@Test public void vm_vitals() { uaaMetricsEmitter.emitVmVitals(); Mockito.verify(statsDClient).gauge(eq("vitals.vm.cpu.count"), gt(0l)); Mockito.verify(statsDClient).gauge(eq("vitals.vm.cpu.load"), geq(0l)); Mockito.verify(statsDClient).gauge(eq("vitals.vm.memory.total"), geq(134217728l)); Mockito.verify(statsDClient).gauge(eq("vitals.vm.memory.committed"), geq(1l)); Mockito.verify(statsDClient).gauge(eq("vitals.vm.memory.free"), geq(1l)); }
/** * Delegates call to {@link AdditionalMatchers#gt(float)}. */ default float gt(float value) { return AdditionalMatchers.gt(value); }
/** * Delegates call to {@link AdditionalMatchers#gt(int)}. */ default int gt(int value) { return AdditionalMatchers.gt(value); }
/** * Delegates call to {@link AdditionalMatchers#gt(float)}. */ default float gt(float value) { return AdditionalMatchers.gt(value); }
/** * Delegates call to {@link AdditionalMatchers#gt(short)}. */ default short gt(short value) { return AdditionalMatchers.gt(value); }
/** * Delegates call to {@link AdditionalMatchers#gt(Comparable)}. */ default <T extends Comparable<T>> T gt(T value) { return AdditionalMatchers.gt(value); }
/** * Delegates call to {@link AdditionalMatchers#gt(double)}. */ default double gt(double value) { return AdditionalMatchers.gt(value); }
/** * Delegates call to {@link AdditionalMatchers#gt(int)}. */ default int gt(int value) { return AdditionalMatchers.gt(value); }
/** * Delegates call to {@link AdditionalMatchers#gt(short)}. */ default short gt(short value) { return AdditionalMatchers.gt(value); }
/** * Delegates call to {@link AdditionalMatchers#gt(byte)}. */ default byte gt(byte value) { return AdditionalMatchers.gt(value); }
/** * Delegates call to {@link AdditionalMatchers#gt(Comparable)}. */ default <T extends Comparable<T>> T gt(T value) { return AdditionalMatchers.gt(value); }
/** * Delegates call to {@link AdditionalMatchers#gt(byte)}. */ default byte gt(byte value) { return AdditionalMatchers.gt(value); }
/** * Delegates call to {@link AdditionalMatchers#gt(double)}. */ default double gt(double value) { return AdditionalMatchers.gt(value); }
/** * Delegates call to {@link AdditionalMatchers#gt(long)}. */ default long gt(long value) { return AdditionalMatchers.gt(value); }
/** * Delegates call to {@link AdditionalMatchers#gt(long)}. */ default long gt(long value) { return AdditionalMatchers.gt(value); }