Vladsz83 commented on code in PR #11293:
URL: https://github.com/apache/ignite/pull/11293#discussion_r1545991892


##########
modules/core/src/main/java/org/apache/ignite/internal/processors/metric/MetricRegistryImpl.java:
##########
@@ -40,23 +41,21 @@
 import org.apache.ignite.internal.processors.metric.impl.LongGauge;
 import org.apache.ignite.internal.processors.metric.impl.ObjectGauge;
 import org.apache.ignite.internal.processors.metric.impl.ObjectMetricImpl;
-import org.apache.ignite.internal.util.typedef.F;
-import org.apache.ignite.spi.metric.BooleanMetric;
-import org.apache.ignite.spi.metric.IntMetric;
+import org.apache.ignite.metric.MetricRegistry;
 import org.apache.ignite.spi.metric.Metric;
-import org.apache.ignite.spi.metric.ReadOnlyMetricRegistry;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
 import static 
org.apache.ignite.internal.processors.metric.impl.HitRateMetric.DFLT_SIZE;
 import static 
org.apache.ignite.internal.processors.metric.impl.MetricUtils.fromFullName;
+import static 
org.apache.ignite.internal.processors.metric.impl.MetricUtils.isCustomPref;
 import static 
org.apache.ignite.internal.processors.metric.impl.MetricUtils.metricName;
 import static 
org.apache.ignite.internal.util.lang.GridFunc.nonThrowableSupplier;
 
 /**
  * Metric registry.
  */
-public class MetricRegistry implements ReadOnlyMetricRegistry {
+public class MetricRegistryImpl implements MetricRegistry {

Review Comment:
   > Looks like MetricRegistry only used when custom metrics returned to the 
user.
   It is used now in many places for the internal metrics. For instance, you 
can try searching for local variable declaration. 
   
   Splitting implementations isn't what we wanted to do. We planned to 
implement custom metrics not with a single ticket. We deciced to add more 
methods to `MetricRegistry` like:
       `IntValueMetric intMetric(String name, @Nullable String desc);`
       `LongValueMetric longMetric(String name, @Nullable String desc);`
       `LongSumMetric longAdderMetric(String name, @Nullable String desc);`
       `DoubleValueMetric doubleMetric(String name, @Nullable String desc);`
   in next ticket and keep the same metric regystry interface to cover also 
IGNITE-12553 (one of next tickets too) with `IgniteMetrics#findRegistry()`. 
   
   If we split `class MetricRegistryImpl` and `interface MetricRegistry`, we 
will revert it if we want to expose read-only internal metrics by 
`IgniteMetrics#findRegistry()` in future.
   
   If we want to add more metric registration methods to the interface, the 
adapter would grow with the next tickets. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to