This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
ipse gerrit-no-reply at lists.osmocom.orgipse has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/18173 )
Change subject: statsd: fix rendering for groups with idx==0
......................................................................
statsd: fix rendering for groups with idx==0
while skipping `0` might be visually pleasant for non-repeating groups, e.g.:
bsc.assignment.completed
it makes metrics parsing very awkward for repeating groups, e.g.:
bts.chreq.total
bts.1.chreq.total
bts.2.chreq.total
and since nobody's going to look at raw statsd stream anyway,
we can live with some extra zeroes
Change-Id: Id294202fbcebe0b6b155c7f267b2da73af20adf4
---
M src/stats_statsd.c
1 file changed, 6 insertions(+), 14 deletions(-)
Approvals:
Jenkins Builder: Verified
ipse: Looks good to me, but someone else must approve
daniel: Looks good to me, approved
diff --git a/src/stats_statsd.c b/src/stats_statsd.c
index c3f739e..d449667 100644
--- a/src/stats_statsd.c
+++ b/src/stats_statsd.c
@@ -99,24 +99,16 @@
int old_len = msgb_length(srep->buffer);
if (prefix) {
- if (name1) {
- if (index1 != 0)
- fmt = "%1$s.%2$s.%6$u.%3$s:%4$d|%5$s";
- else
- fmt = "%1$s.%2$s.%3$s:%4$d|%5$s";
- } else {
+ if (name1)
+ fmt = "%1$s.%2$s.%6$u.%3$s:%4$d|%5$s";
+ else
fmt = "%1$s.%2$0.0s%3$s:%4$d|%5$s";
- }
} else {
prefix = "";
- if (name1) {
- if (index1 != 0)
- fmt = "%1$s%2$s.%6$u.%3$s:%4$d|%5$s";
- else
- fmt = "%1$s%2$s.%3$s:%4$d|%5$s";
- } else {
+ if (name1)
+ fmt = "%1$s%2$s.%6$u.%3$s:%4$d|%5$s";
+ else
fmt = "%1$s%2$0.0s%3$s:%4$d|%5$s";
- }
}
if (srep->agg_enabled) {
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/18173
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Id294202fbcebe0b6b155c7f267b2da73af20adf4
Gerrit-Change-Number: 18173
Gerrit-PatchSet: 1
Gerrit-Owner: Earwin @ Fairwaves <earwin at gmail.com>
Gerrit-Reviewer: Earwin @ Fairwaves <earwin at gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann at sysmocom.de>
Gerrit-Reviewer: ipse <Alexander.Chemeris at gmail.com>
Gerrit-Reviewer: lynxis lazus <lynxis at fe80.eu>
Gerrit-CC: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200511/1893e0f5/attachment.htm>