ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexey Kuznetsov <akuznet...@gridgain.com>
Subject Re: Lets add measure units for metrics
Date Wed, 06 Nov 2019 11:48:13 GMT
Andrey,

The main reason of separate field - is a simplicity of usage in tools.
Yes, we can have measurement units in description, but external tool will
be forced to parse textual representation of units.
Description is a text that has no special format and how we can ask
developers to not forget to specify units in description?
But with enum we can make it mandatory field. Or write a test that will
check all metrics for "not null" for this field.

What do you think?


On Wed, Nov 6, 2019 at 6:28 PM Andrey Gura <agura@apache.org> wrote:

> Units just can be added to a metric description. What is the purpose
> of dedicated field for it?
>
> We doesn't provide any API for work with measurement units and should
> not do it. Metrics interpretation is responsibility of external
> systems for metrics gathering. Enum with metrics measurement doesn't
> bring any value for external systems and only useful thing is self
> documentation.
>
> On Wed, Nov 6, 2019 at 12:42 PM Nikolay Izhikov <nizhikov@apache.org>
> wrote:
> >
> > Hello, Alexey.
> >
> > I'm +1.
> > Let's do it.
> >
> > В Ср, 06/11/2019 в 16:37 +0700, Alexey Kuznetsov пишет:
> > > Hi, All!
> > >
> > > I'm working on a tool for metrics monitoring.
> > > And found that Metric interface [1] has a name and description, but
> has not
> > > measurement units.
> > >
> > > When you are working on a tool that collects all metrics and shows it
> in
> > > human readable format it is a very important piece of information.
> > >
> > > Because we have a lot of different metrics, some of them in bytes,
> some of
> > > them in percents, some of them are simple counters and so on and so
> forth.
> > >
> > > How about to add Enum with all possible measurement units to  Metric
> > > interface [1] ?
> > >
> > > Thoughts?
> > >
> > > [1]
> > >
> https://github.com/apache/ignite/blob/master/modules/core/src/main/java/org/apache/ignite/spi/metric/Metric.java
> > >
>


-- 
Alexey Kuznetsov
GridGain Systems
www.gridgain.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message