[golang][counters] Is there a noticeable performance penalty for using a CounterVec with no labels as opposed to a Counter

18 views
Skip to first unread message

Noam Hurwitz

unread,
Mar 3, 2020, 8:13:34 PM3/3/20
to Prometheus Users
It's easier to locally model all counters as CounterVecs and not pass any labels if we don't want dimensional breakdowns given Go's typing paradigms. I want to make sure doing this is not at excess cost.

Bjoern Rabenstein

unread,
Mar 10, 2020, 8:53:57 AM3/10/20
to Noam Hurwitz, Prometheus Users
AFAICS, there is currently a (small) performance overhead. If that
overhead ever matters in practice, we could introduce a "fast path" in
the implementation of the metrics vector. It should be a fairly easy
and straight forward change. PRs welcome. :o)

--
Björn Rabenstein
[PGP-ID] 0x851C3DA17D748D03
[email] bjo...@rabenste.in
Reply all
Reply to author
Forward
0 new messages