Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

   <T extends Metric> T metric(T metric);

void longMetric(String name, LongSupplier valueSupplier, @Nullable String description);

LongConsumer longMetric(String name, @Nullable String description);

void doubleMetric(String name, DoubleSupplier valueSupplier, @Nullable String description);

DoubleConsumer doubleMetric(String name, @Nullable String description);

void booleanMetric(String name, BooleanSupplier valueSupplier, @Nullable String description);

Consumer<Boolean> booleanMetric(String name, @Nullable String description);

<T> void objectMetric(String name, Class<T> valueType, Supplier<T> valueSupplier, @Nullable String description);

<T> Consumer<T> objectMetric(String name, Class<T> valueType, @Nullable String description);

void removeMetric(String name);

ReadOnlyMetricRegistry registry(String name);
}

Risks and Assumptions

    Custom metrics can affect the performance.

...

Phases

  1. Implementation of the described API.
  2. Extending the API with metrics like Histogram, HitRate. Allowing to configure metrics.
  3. Storing registered custom metrics with their configurations.

...