[PATCH] libosmocore[master]: Convert lib-internal rate_ctr from '.' separator to ':' sepa...

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/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Tue Oct 3 10:41:42 UTC 2017


Hello Jenkins Builder,

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

    https://gerrit.osmocom.org/4131

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

Convert lib-internal rate_ctr from '.' separator to ':' separator

The rate_ctr.c code would do this mangling automatically, but let's
avoid using this from new versions of our code for
simplicity/explicitness.

Change-Id: I24a556f447cfac25efb6e83cac2d0c2972d98fe3
---
M src/gb/gprs_bssgp.c
M src/gb/gprs_ns.c
M tests/stats/stats_test.c
3 files changed, 15 insertions(+), 15 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/31/4131/2

diff --git a/src/gb/gprs_bssgp.c b/src/gb/gprs_bssgp.c
index 2552849..b906643 100644
--- a/src/gb/gprs_bssgp.c
+++ b/src/gb/gprs_bssgp.c
@@ -43,17 +43,17 @@
 void *bssgp_tall_ctx = NULL;
 
 static const struct rate_ctr_desc bssgp_ctr_description[] = {
-	{ "packets.in",	"Packets at BSSGP Level ( In)" },
-	{ "packets.out","Packets at BSSGP Level (Out)" },
-	{ "bytes.in",	"Bytes at BSSGP Level   ( In)" },
-	{ "bytes.out",	"Bytes at BSSGP Level   (Out)" },
+	{ "packets:in",	"Packets at BSSGP Level ( In)" },
+	{ "packets:out","Packets at BSSGP Level (Out)" },
+	{ "bytes:in",	"Bytes at BSSGP Level   ( In)" },
+	{ "bytes:out",	"Bytes at BSSGP Level   (Out)" },
 	{ "blocked",	"BVC Blocking count" },
 	{ "discarded",	"BVC LLC Discarded count" },
 	{ "status",	"BVC Status count" },
 };
 
 static const struct rate_ctr_group_desc bssgp_ctrg_desc = {
-	.group_name_prefix = "bssgp.bss_ctx",
+	.group_name_prefix = "bssgp:bss_ctx",
 	.group_description = "BSSGP Peer Statistics",
 	.num_ctr = ARRAY_SIZE(bssgp_ctr_description),
 	.ctr_desc = bssgp_ctr_description,
diff --git a/src/gb/gprs_ns.c b/src/gb/gprs_ns.c
index d20ed23..6b457e7 100644
--- a/src/gb/gprs_ns.c
+++ b/src/gb/gprs_ns.c
@@ -110,22 +110,22 @@
 };
 
 static const struct rate_ctr_desc nsvc_ctr_description[] = {
-	{ "packets.in", "Packets at NS Level  ( In)" },
-	{ "packets.out","Packets at NS Level  (Out)" },
-	{ "bytes.in",	"Bytes at NS Level    ( In)" },
-	{ "bytes.out",	"Bytes at NS Level    (Out)" },
+	{ "packets:in", "Packets at NS Level  ( In)" },
+	{ "packets:out","Packets at NS Level  (Out)" },
+	{ "bytes:in",	"Bytes at NS Level    ( In)" },
+	{ "bytes:out",	"Bytes at NS Level    (Out)" },
 	{ "blocked",	"NS-VC Block count         " },
 	{ "dead",	"NS-VC gone dead count     " },
 	{ "replaced",	"NS-VC replaced other count" },
 	{ "nsei-chg",	"NS-VC changed NSEI count  " },
 	{ "inv-nsvci",	"NS-VCI was invalid count  " },
 	{ "inv-nsei",	"NSEI was invalid count    " },
-	{ "lost.alive",	"ALIVE ACK missing count   " },
-	{ "lost.reset",	"RESET ACK missing count   " },
+	{ "lost:alive",	"ALIVE ACK missing count   " },
+	{ "lost:reset",	"RESET ACK missing count   " },
 };
 
 static const struct rate_ctr_group_desc nsvc_ctrg_desc = {
-	.group_name_prefix = "ns.nsvc",
+	.group_name_prefix = "ns:nsvc",
 	.group_description = "NSVC Peer Statistics",
 	.num_ctr = ARRAY_SIZE(nsvc_ctr_description),
 	.ctr_desc = nsvc_ctr_description,
diff --git a/tests/stats/stats_test.c b/tests/stats/stats_test.c
index 0234460..61673ba 100644
--- a/tests/stats/stats_test.c
+++ b/tests/stats/stats_test.c
@@ -35,12 +35,12 @@
 };
 
 static const struct rate_ctr_desc ctr_description[] = {
-	[TEST_A_CTR] = { "ctr.a", "The A counter value"},
-	[TEST_B_CTR] = { "ctr.b", "The B counter value"},
+	[TEST_A_CTR] = { "ctr:a", "The A counter value"},
+	[TEST_B_CTR] = { "ctr:b", "The B counter value"},
 };
 
 static const struct rate_ctr_group_desc ctrg_desc = {
-	.group_name_prefix = "ctr-test.one",
+	.group_name_prefix = "ctr-test:one",
 	.group_description = "Counter test number 1",
 	.num_ctr = ARRAY_SIZE(ctr_description),
 	.ctr_desc = ctr_description,

-- 
To view, visit https://gerrit.osmocom.org/4131
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I24a556f447cfac25efb6e83cac2d0c2972d98fe3
Gerrit-PatchSet: 2
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list