Change in libosmocore[master]: stat, rate_ctr: Allow setting group name and use it at report time

pespin gerrit-no-reply at
Tue Jun 1 21:08:01 UTC 2021

Hello osmith, Jenkins Builder, laforge, fixeria, 

I'd like you to reexamine a change. Please visit

to look at the new patch set (#3).

Change subject: stat,rate_ctr: Allow setting group name and use it at report time

stat,rate_ctr: Allow setting group name and use it at report time

This patch adds a new field "name" to the rate_ctr and osmo_stat_item_group
structs, together with an API to set it. This new field allows for easy
identification of specific group instances when several of them exists,
rather than using a sometimes random/increasing index value.

If set, this name (string) is used instead of the index by the stats

The name, if set, is also printed during "show stats" VTY commands.

It's up to the user or application to set up unique or meaningful names
to fullfill one's needs.

WARNING: this commit breaks ABI and possibly creates unexpected behavior
when run with non-rebuilt apps which use the modified structs directly
to get the coutners, or if use the static inline API rate_ctr_inc2().
Existing users of these structs should migrate to use new APIs
introduced in follow-up commits instead of accessing the field directly.

Related: SYS#5456
Change-Id: I0dc510783dd9ae8436dae8005a7b3330e80d36f3
M include/osmocom/core/rate_ctr.h
M include/osmocom/core/stat_item.h
M src/rate_ctr.c
M src/stat_item.c
M src/stats_statsd.c
M src/vty/utils.c
7 files changed, 67 insertions(+), 35 deletions(-)

  git pull ssh:// refs/changes/67/24467/3
To view, visit
To unsubscribe, or for help writing mail filters, visit

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I0dc510783dd9ae8436dae8005a7b3330e80d36f3
Gerrit-Change-Number: 24467
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin at>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy at>
Gerrit-Reviewer: laforge <laforge at>
Gerrit-Reviewer: osmith <osmith at>
Gerrit-MessageType: newpatchset
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gerrit-log mailing list