Change in libosmocore[master]: stats_vty: also show rate counter group name (if present)

fixeria gerrit-no-reply at lists.osmocom.org
Mon Jun 7 14:23:53 UTC 2021


fixeria has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/24577 )

Change subject: stats_vty: also show rate counter group name (if present)
......................................................................

stats_vty: also show rate counter group name (if present)

Change-Id: I358f52e81a85f041fc21960634d04d18e7883dd5
---
M src/vty/stats_vty.c
1 file changed, 4 insertions(+), 1 deletion(-)

Approvals:
  Jenkins Builder: Verified
  dexter: Looks good to me, but someone else must approve
  pespin: Looks good to me, approved



diff --git a/src/vty/stats_vty.c b/src/vty/stats_vty.c
index 630ee32..d5d3292 100644
--- a/src/vty/stats_vty.c
+++ b/src/vty/stats_vty.c
@@ -555,7 +555,10 @@
 static int rate_ctr_group_handler(struct rate_ctr_group *ctrg, void *sctx_)
 {
 	struct vty *vty = sctx_;
-	vty_out(vty, "%s %u:%s", ctrg->desc->group_description, ctrg->idx, VTY_NEWLINE);
+	vty_out(vty, "%s %u", ctrg->desc->group_description, ctrg->idx);
+	if (ctrg->name != NULL)
+		vty_out(vty, " (%s)", ctrg->name);
+	vty_out(vty, ":%s", VTY_NEWLINE);
 	vty_out_rate_ctr_group_fmt(vty, "%25n: %10c (%S/s %M/m %H/h %D/d) %d", ctrg);
 	return 0;
 }

-- 
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/24577
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I358f52e81a85f041fc21960634d04d18e7883dd5
Gerrit-Change-Number: 24577
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann at sysmocom.de>
Gerrit-Reviewer: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210607/bcde316c/attachment.htm>


More information about the gerrit-log mailing list