Hi Sergey,

The rationale behind this makes sense to me, 
though I still think it should be still a distinct new entity rather than 
“extending” the semantics of the existing one. 
We had about a year worth of rather disruptive injecting types in API 
so the users can distinguish a u32 IPv4 address from u32 Boolean and such - and 
I would rather avoid any moves in the opposite direction :-)

Now, with the rationale clarified -
I am not sure what the performance implications are of having such an entity 
(assuming the best case it’s widespread use - “gauge, but faster” - what’s not 
to like ?) - so maybe someone with more experience in that area can chime in. 
(I reacted mostly because I am involved with various release-y-infrastructure-y 
things that make checkstyle say “-1“ :-)

--a

>> On 15 Sep 2020, at 12:58, Sergey Matov <[email protected]> wrote:
> 
> Hello Andrew. Thanks for quick response.
> 
> In a nutshell - yes, gauges are something I am also currently using to track 
> the number of entries in a bihash table(for example), however gauge update 
> will be done each time when the stats segment performs processing. Idea was 
> to track value more rapidly w/o increasing stats update interval. I thought 
> it worth to have it in upstream code. 
> 
>> On Tue, 15 Sep 2020 at 14:50, Andrew 👽 Yourtchenko <[email protected]> 
>> wrote:
>> Hi Sergey,
>> 
>> have a look at 22963; the checkstyle job requires a particular version of 
>> checkstyle, it’s WIP in progress to update it, as well as to give us an 
>> option to selectively try out clang-format on some files.
>> 
>> However; I think this functionality of this patch has more fundamental 
>> question: it allows the use of the function that essentially renders the 
>> simple counter ambiguous in the way i see it as a user operationally:
>> 
>> If the counter value is 42 - does it mean it was incremented to 10042 and 
>> then decremented by 10000 ? Or was it incremented by 10000000042 and then 
>> decremented by 10000000000 ?
>> 
>> The only sensible operation for something that is the *counter*, is to 
>> either increment or reset to zero in my view. You should not be allowed to 
>> “uncount” stuff.
>> 
>> However, if we are talking about a *gauge*, then it is a different story, 
>> and I suspect this may be the functionality you are after ? 
>> Like, the current number of connections tracked somewhere, etc ?
>> 
>> --a
>> 
>>>> On 15 Sep 2020, at 12:25, Sergey Matov <[email protected]> wrote:
>>> 
>>> Greetings VPP community.
>>> 
>>> Recently I've created a small patch for counter.h core file.
>>> For some reason several patchsets are failing with checkstyle issues.
>>> https://gerrit.fd.io/r/c/vpp/+/28843
>>> Fixing of the change by indent causes the entire file to be reworked since 
>>> the old file does not fit indent requirements. What is the best way to 
>>> process changes that fit the checkstyle but the original file does not?
>>> Thanks in advance
>>> 
>>> -- 
>>> Sergey Matov
>>> 
>>> -- 
>>> 
>>> t: +49 391 819099-0
>>> 
>>> ------------------------------- enabling your networks 
>>> -----------------------------
>>> 
>>> Travelping GmbH 
>>> Roentgenstraße 13
>>> 39108 Magdeburg
>>> Germany
>>> 
>>> 
>>> t: +49 391 819099-0
>>> f: +49 391 819099-299
>>> 
>>> e: [email protected]
>>> w: https://www.travelping.com/
>>> 
>>> Company registration: Amtsgericht Stendal 
>>> Managing Director: Holger Winkelmann
>>> Reg. No.: HRB 10578
>>> VAT ID: DE236673780
>>> 
> 
> 
> -- 
> Sergey Matov
> 
> -- 
> 
> t: +49 391 819099-0
> 
> ------------------------------- enabling your networks 
> -----------------------------
> 
> Travelping GmbH 
> Roentgenstraße 13
> 39108 Magdeburg
> Germany
> 
> 
> t: +49 391 819099-0
> f: +49 391 819099-299
> 
> e: [email protected]
> w: https://www.travelping.com/
> 
> Company registration: Amtsgericht Stendal 
> Managing Director: Holger Winkelmann
> Reg. No.: HRB 10578
> VAT ID: DE236673780
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#17400): https://lists.fd.io/g/vpp-dev/message/17400
Mute This Topic: https://lists.fd.io/mt/76861769/21656
Group Owner: [email protected]
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to