On Tue, Aug 16, 2016 at 5:11 PM, Bertrand Delacretaz <bdelacre...@apache.org> wrote: > 1) Is it generally ok for Gauge.getValue() (for example, as this is > what this code uses) to have to do some work to produce a value, as > opposed to accumulating values earlier.
Gauge.getValue() should be fast and kind of O(1). As Stefan mentioned here its not that costly. If we need to optimize we can probably use PriorityQueue within a JobListener to keep it upto date > Does the metrics library by default make all values available via JMX as well? Yes they way we have configured it in Sling Commons Metrics all Metrices are exposed over JMX also Chetan Mehrotra