I've just wanted to avoid the trick of fetching the counter's value and
calling "set" with (value - 1). Extra decrementing method would not be
harmful and can be used only when it's desired.

On Tue, 15 Sep 2020 at 16:02, <otr...@employees.org> wrote:

> Hi Sergey,
>
> > 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.
>
> There are two types of gauges.
> The one where you register with the stats segment, where the stats process
> periodically calls the registered function, inquiring the state of the
> gauge.
> The other where the client code itself manipulates the gauge directly,
> just like it does for other counters.
>
> For the latter case, can you not use vlib_set_simple_counter() directly?
>
> Just wondering what a "decrementing" counter (or gauge) would mean??
>
> Best regards,
> Ole
>
>

-- 

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: i...@travelping.com
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 (#17420): https://lists.fd.io/g/vpp-dev/message/17420
Mute This Topic: https://lists.fd.io/mt/76861769/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to