/** * Creates a new {@link Counter} and registers it under the given name. * * @param name the name of the metric * @return a new {@link Counter} */ public Counter counter(final MetricId name) { return getOrAdd(name, SemanticMetricBuilder.COUNTERS); }
/** * Creates a new {@link Meter} and registers it under the given name. * * @param name the name of the metric * @return a new {@link Meter} */ public Meter meter(final MetricId name) { return getOrAdd(name, SemanticMetricBuilder.METERS); }
/** * Creates a new {@link Counter} and registers it under the given name. * * @param name the name of the metric * @return a new {@link Counter} */ public Counter counter(final MetricId name) { return getOrAdd(name, SemanticMetricBuilder.COUNTERS); }
/** * Creates a new {@link Meter} and registers it under the given name. * * @param name the name of the metric * @return a new {@link Meter} */ public Meter meter(final MetricId name) { return getOrAdd(name, SemanticMetricBuilder.METERS); }
public DerivingMeter derivingMeter(final MetricId name) { return getOrAdd(name, SemanticMetricBuilder.DERIVING_METERS); }
public DerivingMeter derivingMeter(final MetricId name) { return getOrAdd(name, SemanticMetricBuilder.DERIVING_METERS); }
/** * 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)); }
private Histogram resourceDemandedHistogram(String resource) { return resourceDemandedHistograms.computeIfAbsent( resource, (op) -> registry.getOrAdd(RESOURCE_DEMANDED.tagged("resource", resource), HISTOGRAM)); }
/** * Creates a new {@link Timer} 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 Timer} */ public Timer timer(final MetricId name, Supplier<Reservoir> reservoirSupplier) { return getOrAdd(name, SemanticMetricBuilderFactory.timerWithReservoir(reservoirSupplier)); }
private Histogram resourceUsedHistogram(String resource) { return resourceUsedHistograms.computeIfAbsent( resource, (op) -> registry.getOrAdd(RESOURCE_USED.tagged("resource", resource), HISTOGRAM)); }
private Histogram dockerOpHistogram(String operation, String status) { return dockerOperationHistograms.computeIfAbsent( operation, (op) -> registry.getOrAdd(DOCKER_DURATION.tagged(OPERATION, op, STATUS, status), HISTOGRAM)); }
/** * Creates a new {@link Timer} and registers it under the given name. * * @param name the name of the metric * @return a new {@link Timer} */ public Timer timer(final MetricId name) { return getOrAdd(name, SemanticMetricBuilderFactory.timerWithReservoir(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 Timer} and registers it under the given name. * * @param name the name of the metric * @return a new {@link Timer} */ public Timer timer(final MetricId name) { return getOrAdd(name, SemanticMetricBuilderFactory.timerWithReservoir(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 Timer} 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 Timer} */ public Timer timer(final MetricId name, Supplier<Reservoir> reservoirSupplier) { return getOrAdd(name, SemanticMetricBuilderFactory.timerWithReservoir(reservoirSupplier)); }
private Histogram storageOpHistogram(String operation, String status) { return storageOperationHistograms.computeIfAbsent( operation, (op) -> registry.getOrAdd(STORAGE_DURATION.tagged(OPERATION, op, STATUS, status), HISTOGRAM)); }
private Histogram resourceConfiguredHistogram(String resource) { return resourceConfiguredHistograms.computeIfAbsent( resource, (op) -> registry.getOrAdd(RESOURCE_CONFIGURED.tagged("resource", resource), HISTOGRAM)); }
private Histogram tickHistogram(String type) { return tickHistograms.computeIfAbsent( type, (op) -> registry.getOrAdd(TICK_DURATION.tagged("type", type), HISTOGRAM)); }