/** * Creates a new {@link Histogram} and registers it under the given name. * * @param name the name of the metric * @return a new {@link Histogram} */ public Histogram histogram(final MetricId name) { return getOrAdd(name, SemanticMetricBuilderFactory.histogramWithReservoir(defaultReservoirSupplier)); }
/** * Creates a new {@link Histogram} and registers it under the given name. * * @param name the name of the metric * @return a new {@link Histogram} */ public Histogram histogram(final MetricId name) { return getOrAdd(name, SemanticMetricBuilderFactory.histogramWithReservoir(defaultReservoirSupplier)); }
/** * Creates a new {@link Histogram} with a custom {@link Reservoir} and registers it under * the given name. * * @param name the name of the metric * @param reservoirSupplier a {@link Supplier} that returns an instance of {@link Reservoir} * @return a new {@link Histogram} */ public Histogram histogram(final MetricId name, Supplier<Reservoir> reservoirSupplier) { return getOrAdd(name, SemanticMetricBuilderFactory.histogramWithReservoir(reservoirSupplier)); }
/** * Creates a new {@link Histogram} with a custom {@link Reservoir} and registers it under * the given name. * * @param name the name of the metric * @param reservoirSupplier a {@link Supplier} that returns an instance of {@link Reservoir} * @return a new {@link Histogram} */ public Histogram histogram(final MetricId name, Supplier<Reservoir> reservoirSupplier) { return getOrAdd(name, SemanticMetricBuilderFactory.histogramWithReservoir(reservoirSupplier)); }