@Test public void testObserve() { noLabels.observe(2); assertEquals(1.0, getCount(), .001); assertEquals(2.0, getSum(), .001); assertEquals(1.0, noLabels.get().count, .001); assertEquals(2.0, noLabels.get().sum, .001); noLabels.labels().observe(4); assertEquals(2.0, getCount(), .001); assertEquals(6.0, getSum(), .001); assertEquals(2.0, noLabels.get().count, .001); assertEquals(6.0, noLabels.get().sum, .001); }
public void observe(double amt) { noLabelsChild.observe(amt); }
Summary extends SimpleCollector<Summary.Child> implements Counter.Describable { public void observe(double amt) { noLabelsChild.observe(amt); } }
Summary extends SimpleCollector<Summary.Child> implements Counter.Describable { public void observe(double amt) { noLabelsChild.observe(amt); } Summary(Builder b); }
Summary extends SimpleCollector<Summary.Child> implements Counter.Describable { public void observe(double amt) { noLabelsChild.observe(amt); } Summary(Builder b); static Builder build(String name, String help); static Builder build(); void observe(double amt); Timer startTimer(); double time(Runnable timeable); E time(Callable<E> timeable); Child.Value get(); @Override List<MetricFamilySamples> collect(); @Override List<MetricFamilySamples> describe(); }
Summary extends SimpleCollector<Summary.Child> implements Counter.Describable { public void observe(double amt) { noLabelsChild.observe(amt); } Summary(Builder b); static Builder build(String name, String help); static Builder build(); void observe(double amt); Timer startTimer(); double time(Runnable timeable); E time(Callable<E> timeable); Child.Value get(); @Override List<MetricFamilySamples> collect(); @Override List<MetricFamilySamples> describe();  }