io.micrometer.core.instrument.noop.NoopFunctionCounter Java Examples
The following examples show how to use
io.micrometer.core.instrument.noop.NoopFunctionCounter.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CompositeFunctionCounter.java From micrometer with Apache License 2.0 | 4 votes |
@Override FunctionCounter newNoopMeter() { return new NoopFunctionCounter(getId()); }
Example #2
Source File: NoopMeterRegistry.java From dolphin-platform with Apache License 2.0 | 4 votes |
@Override protected <T> FunctionCounter newFunctionCounter(final Meter.Id id, final T obj, final ToDoubleFunction<T> countFunction) { return new NoopFunctionCounter(id); }
Example #3
Source File: NoopMeterRegistry.java From armeria with Apache License 2.0 | 4 votes |
@Override protected <T> FunctionCounter newFunctionCounter(Id id, T obj, ToDoubleFunction<T> f) { return new NoopFunctionCounter(id); }
Example #4
Source File: MeterRegistry.java From micrometer with Apache License 2.0 | 2 votes |
/** * Tracks a number, maintaining a weak reference on it. * * @param id The identifier for this function counter. * @param obj State object used to compute a value. * @param countFunction Function that produces a monotonically increasing counter value from the state object. * @param <T> The type of the state object from which the counter value is extracted. * @return A new or existing function counter. */ <T> FunctionCounter counter(Meter.Id id, T obj, ToDoubleFunction<T> countFunction) { return registerMeterIfNecessary(FunctionCounter.class, id, id2 -> newFunctionCounter(id2, obj, countFunction), NoopFunctionCounter::new); }