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

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


Review at  https://gerrit.osmocom.org/4131

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/gb/gprs_ns_test.ok
M tests/stats/stats_test.c
M tests/stats/stats_test.ok
5 files changed, 294 insertions(+), 57 deletions(-)


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

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/gb/gprs_ns_test.ok b/tests/gb/gprs_ns_test.ok
index b0c81e4..bd3cca8 100644
--- a/tests/gb/gprs_ns_test.ok
+++ b/tests/gb/gprs_ns_test.ok
@@ -15,6 +15,10 @@
 
 Current NS-VCIs:
     VCI 0x1001, NSEI 0x1000, peer 0x01020304:1111, blocked
+         Packets at NS Level  ( In): 1
+         Packets at NS Level  (Out): 2
+         Bytes at NS Level    ( In): 12
+         Bytes at NS Level    (Out): 10
 
 --- Delete nsvc object (round 0)---
 
@@ -36,6 +40,10 @@
 
 Current NS-VCIs:
     VCI 0x1001, NSEI 0x1000, peer 0x01020304:1111, blocked
+         Packets at NS Level  ( In): 1
+         Packets at NS Level  (Out): 2
+         Bytes at NS Level    ( In): 12
+         Bytes at NS Level    (Out): 10
 
 --- Delete nsvc object (round 1)---
 
@@ -57,6 +65,10 @@
 
 Current NS-VCIs:
     VCI 0x1001, NSEI 0x1000, peer 0x01020304:1111, blocked
+         Packets at NS Level  ( In): 1
+         Packets at NS Level  (Out): 2
+         Bytes at NS Level    ( In): 12
+         Bytes at NS Level    (Out): 10
 
 --- Delete nsvc object (round 2)---
 
@@ -78,6 +90,10 @@
 
 Current NS-VCIs:
     VCI 0x1001, NSEI 0x1000, peer 0x01020304:1111, blocked
+         Packets at NS Level  ( In): 1
+         Packets at NS Level  (Out): 2
+         Bytes at NS Level    ( In): 12
+         Bytes at NS Level    (Out): 10
 
 --- Delete nsvc object (round 3)---
 
@@ -146,6 +162,10 @@
 
 Current NS-VCIs:
     VCI 0x1122, NSEI 0x1122, peer 0x01020304:1111
+         Packets at NS Level  ( In): 4
+         Packets at NS Level  (Out): 4
+         Bytes at NS Level    ( In): 15
+         Bytes at NS Level    (Out): 12
 
 PROCESSING BSSGP RESET from 0x01020304:1111
 00 00 00 00 22 04 82 4a 2e 07 81 08 08 88 10 20 30 40 50 60 10 00 
@@ -171,6 +191,10 @@
 
 Current NS-VCIs:
     VCI 0x1122, NSEI 0x1122, peer 0x01020304:2222, blocked
+         Packets at NS Level  ( In): 6
+         Packets at NS Level  (Out): 6
+         Bytes at NS Level    ( In): 49
+         Bytes at NS Level    (Out): 22
 
 --- Peer port changes, RESET, VCI changes ---
 
@@ -188,7 +212,15 @@
 
 Current NS-VCIs:
     VCI 0x3344, NSEI 0x1122, peer 0x01020304:3333, blocked
+         Packets at NS Level  ( In): 1
+         Packets at NS Level  (Out): 2
+         Bytes at NS Level    ( In): 12
+         Bytes at NS Level    (Out): 10
     VCI 0x1122, NSEI 0x1122, peer 0x01020304:2222, blocked
+         Packets at NS Level  ( In): 6
+         Packets at NS Level  (Out): 6
+         Bytes at NS Level    ( In): 49
+         Bytes at NS Level    (Out): 22
 
 --- Peer port changes, RESET, NSEI changes ---
 
@@ -206,7 +238,15 @@
 
 Current NS-VCIs:
     VCI 0x3344, NSEI 0x1122, peer 0x01020304:3333, blocked
+         Packets at NS Level  ( In): 1
+         Packets at NS Level  (Out): 2
+         Bytes at NS Level    ( In): 12
+         Bytes at NS Level    (Out): 10
     VCI 0x1122, NSEI 0x3344, peer 0x01020304:4444, blocked
+         Packets at NS Level  ( In): 7
+         Packets at NS Level  (Out): 8
+         Bytes at NS Level    ( In): 61
+         Bytes at NS Level    (Out): 32
          NS-VC changed NSEI count  : 1
 
 --- Peer port 3333, RESET, VCI is changed back ---
@@ -226,7 +266,15 @@
 
 Current NS-VCIs:
     VCI 0x3344, NSEI 0x1122, peer 0x00000000:0, blocked
+         Packets at NS Level  ( In): 2
+         Packets at NS Level  (Out): 2
+         Bytes at NS Level    ( In): 24
+         Bytes at NS Level    (Out): 10
     VCI 0x1122, NSEI 0x1122, peer 0x01020304:3333, blocked
+         Packets at NS Level  ( In): 7
+         Packets at NS Level  (Out): 10
+         Bytes at NS Level    ( In): 61
+         Bytes at NS Level    (Out): 42
          NS-VC replaced other count: 1
          NS-VC changed NSEI count  : 2
 
@@ -246,7 +294,15 @@
 
 Current NS-VCIs:
     VCI 0x3344, NSEI 0x1122, peer 0x00000000:0, blocked
+         Packets at NS Level  ( In): 2
+         Packets at NS Level  (Out): 2
+         Bytes at NS Level    ( In): 24
+         Bytes at NS Level    (Out): 10
     VCI 0x1122, NSEI 0x1122, peer 0x01020304:4444, blocked
+         Packets at NS Level  ( In): 8
+         Packets at NS Level  (Out): 12
+         Bytes at NS Level    ( In): 73
+         Bytes at NS Level    (Out): 52
          NS-VC replaced other count: 1
          NS-VC changed NSEI count  : 2
 
@@ -290,6 +346,10 @@
 
 Current NS-VCIs:
     VCI 0x1001, NSEI 0x1000, peer 0x01020304:1111
+         Packets at NS Level  ( In): 4
+         Packets at NS Level  (Out): 4
+         Bytes at NS Level    ( In): 15
+         Bytes at NS Level    (Out): 12
 
 --- Setup VC 2 BSS -> SGSN ---
 
@@ -331,7 +391,15 @@
 
 Current NS-VCIs:
     VCI 0x2001, NSEI 0x2000, peer 0x01020304:2222
+         Packets at NS Level  ( In): 4
+         Packets at NS Level  (Out): 4
+         Bytes at NS Level    ( In): 15
+         Bytes at NS Level    (Out): 12
     VCI 0x1001, NSEI 0x1000, peer 0x01020304:1111
+         Packets at NS Level  ( In): 4
+         Packets at NS Level  (Out): 4
+         Bytes at NS Level    ( In): 15
+         Bytes at NS Level    (Out): 12
 
 --- Setup VC 1 SGSN -> BSS ---
 
@@ -348,7 +416,15 @@
 
 Current NS-VCIs:
     VCI 0x2001, NSEI 0x2000, peer 0x01020304:2222
+         Packets at NS Level  ( In): 4
+         Packets at NS Level  (Out): 4
+         Bytes at NS Level    ( In): 15
+         Bytes at NS Level    (Out): 12
     VCI 0x1001, NSEI 0x1000, peer 0x01020304:1111, blocked
+         Packets at NS Level  ( In): 5
+         Packets at NS Level  (Out): 6
+         Bytes at NS Level    ( In): 24
+         Bytes at NS Level    (Out): 25
          NS-VC Block count         : 1
 
 --- Exchange NSEI 1 + 2 links ---
@@ -369,7 +445,15 @@
 
 Current NS-VCIs:
     VCI 0x2001, NSEI 0x2000, peer 0x00000000:0, blocked, dead
+         Packets at NS Level  ( In): 5
+         Packets at NS Level  (Out): 5
+         Bytes at NS Level    ( In): 24
+         Bytes at NS Level    (Out): 24
     VCI 0x1001, NSEI 0x1000, peer 0x01020304:2222, blocked
+         Packets at NS Level  ( In): 5
+         Packets at NS Level  (Out): 7
+         Bytes at NS Level    ( In): 24
+         Bytes at NS Level    (Out): 26
          NS-VC Block count         : 2
          NS-VC replaced other count: 1
 
@@ -390,7 +474,15 @@
 
 Current NS-VCIs:
     VCI 0x2001, NSEI 0x2000, peer 0x00000000:0, blocked, dead
+         Packets at NS Level  ( In): 5
+         Packets at NS Level  (Out): 6
+         Bytes at NS Level    ( In): 24
+         Bytes at NS Level    (Out): 36
     VCI 0x1001, NSEI 0x1000, peer 0x01020304:2222, blocked
+         Packets at NS Level  ( In): 6
+         Packets at NS Level  (Out): 9
+         Bytes at NS Level    ( In): 33
+         Bytes at NS Level    (Out): 39
          NS-VC Block count         : 3
          NS-VC replaced other count: 1
 
@@ -434,7 +526,15 @@
 
 Current NS-VCIs:
     VCI 0x2001, NSEI 0x2000, peer 0x01020304:1111
+         Packets at NS Level  ( In): 9
+         Packets at NS Level  (Out): 10
+         Bytes at NS Level    ( In): 39
+         Bytes at NS Level    (Out): 48
     VCI 0x1001, NSEI 0x1000, peer 0x01020304:2222, blocked
+         Packets at NS Level  ( In): 6
+         Packets at NS Level  (Out): 9
+         Bytes at NS Level    ( In): 33
+         Bytes at NS Level    (Out): 39
          NS-VC Block count         : 3
          NS-VC replaced other count: 1
 
@@ -454,7 +554,15 @@
 
 Current NS-VCIs:
     VCI 0x2001, NSEI 0x2000, peer 0x01020304:1111
+         Packets at NS Level  ( In): 9
+         Packets at NS Level  (Out): 10
+         Bytes at NS Level    ( In): 39
+         Bytes at NS Level    (Out): 48
     VCI 0x1001, NSEI 0xf000, peer 0x01020304:2222, blocked
+         Packets at NS Level  ( In): 7
+         Packets at NS Level  (Out): 11
+         Bytes at NS Level    ( In): 45
+         Bytes at NS Level    (Out): 49
          NS-VC Block count         : 3
          NS-VC replaced other count: 1
          NS-VC changed NSEI count  : 1
@@ -476,9 +584,19 @@
 
 Current NS-VCIs:
     VCI 0xf001, NSEI 0x1000, peer 0x01020304:2222, blocked
+         Packets at NS Level  (Out): 2
+         Bytes at NS Level    (Out): 10
          NS-VC replaced other count: 1
     VCI 0x2001, NSEI 0x2000, peer 0x01020304:1111
+         Packets at NS Level  ( In): 9
+         Packets at NS Level  (Out): 10
+         Bytes at NS Level    ( In): 39
+         Bytes at NS Level    (Out): 48
     VCI 0x1001, NSEI 0xf000, peer 0x00000000:0, blocked
+         Packets at NS Level  ( In): 8
+         Packets at NS Level  (Out): 11
+         Bytes at NS Level    ( In): 57
+         Bytes at NS Level    (Out): 49
          NS-VC Block count         : 3
          NS-VC replaced other count: 1
          NS-VC changed NSEI count  : 1
@@ -500,9 +618,21 @@
 
 Current NS-VCIs:
     VCI 0xf001, NSEI 0x1000, peer 0x00000000:0, blocked
+         Packets at NS Level  ( In): 1
+         Packets at NS Level  (Out): 2
+         Bytes at NS Level    ( In): 12
+         Bytes at NS Level    (Out): 10
          NS-VC replaced other count: 1
     VCI 0x2001, NSEI 0x2000, peer 0x01020304:1111
+         Packets at NS Level  ( In): 9
+         Packets at NS Level  (Out): 10
+         Bytes at NS Level    ( In): 39
+         Bytes at NS Level    (Out): 48
     VCI 0x1001, NSEI 0x1000, peer 0x01020304:2222, blocked
+         Packets at NS Level  ( In): 8
+         Packets at NS Level  (Out): 13
+         Bytes at NS Level    ( In): 57
+         Bytes at NS Level    (Out): 59
          NS-VC Block count         : 3
          NS-VC replaced other count: 2
          NS-VC changed NSEI count  : 2
@@ -516,9 +646,21 @@
 
 Current NS-VCIs:
     VCI 0xf001, NSEI 0x1000, peer 0x00000000:0, blocked
+         Packets at NS Level  ( In): 1
+         Packets at NS Level  (Out): 2
+         Bytes at NS Level    ( In): 12
+         Bytes at NS Level    (Out): 10
          NS-VC replaced other count: 1
     VCI 0x2001, NSEI 0x2000, peer 0x01020304:1111
+         Packets at NS Level  ( In): 9
+         Packets at NS Level  (Out): 10
+         Bytes at NS Level    ( In): 39
+         Bytes at NS Level    (Out): 48
     VCI 0x1001, NSEI 0x1000, peer 0x01020304:2222, blocked
+         Packets at NS Level  ( In): 9
+         Packets at NS Level  (Out): 13
+         Bytes at NS Level    ( In): 66
+         Bytes at NS Level    (Out): 59
          NS-VC Block count         : 3
          NS-VC replaced other count: 2
          NS-VC changed NSEI count  : 2
@@ -538,9 +680,21 @@
 
 Current NS-VCIs:
     VCI 0xf001, NSEI 0x1000, peer 0x00000000:0, blocked
+         Packets at NS Level  ( In): 1
+         Packets at NS Level  (Out): 2
+         Bytes at NS Level    ( In): 12
+         Bytes at NS Level    (Out): 10
          NS-VC replaced other count: 1
     VCI 0x2001, NSEI 0x2000, peer 0x01020304:1111
+         Packets at NS Level  ( In): 9
+         Packets at NS Level  (Out): 10
+         Bytes at NS Level    ( In): 39
+         Bytes at NS Level    (Out): 48
     VCI 0x1001, NSEI 0xf000, peer 0x01020304:2222, blocked
+         Packets at NS Level  ( In): 10
+         Packets at NS Level  (Out): 15
+         Bytes at NS Level    ( In): 75
+         Bytes at NS Level    (Out): 72
          NS-VC Block count         : 4
          NS-VC replaced other count: 2
          NS-VC changed NSEI count  : 3
@@ -561,10 +715,22 @@
 
 Current NS-VCIs:
     VCI 0xf001, NSEI 0x1000, peer 0x01020304:2222, blocked
+         Packets at NS Level  ( In): 1
+         Packets at NS Level  (Out): 3
+         Bytes at NS Level    ( In): 12
+         Bytes at NS Level    (Out): 11
          NS-VC Block count         : 1
          NS-VC replaced other count: 2
     VCI 0x2001, NSEI 0x2000, peer 0x01020304:1111
+         Packets at NS Level  ( In): 9
+         Packets at NS Level  (Out): 10
+         Bytes at NS Level    ( In): 39
+         Bytes at NS Level    (Out): 48
     VCI 0x1001, NSEI 0xf000, peer 0x00000000:0, blocked, dead
+         Packets at NS Level  ( In): 11
+         Packets at NS Level  (Out): 16
+         Bytes at NS Level    ( In): 84
+         Bytes at NS Level    (Out): 84
          NS-VC Block count         : 4
          NS-VC replaced other count: 2
          NS-VC changed NSEI count  : 3
@@ -619,10 +785,22 @@
 
 Current NS-VCIs:
     VCI 0xf001, NSEI 0x1000, peer 0x00000000:0, blocked
+         Packets at NS Level  ( In): 2
+         Packets at NS Level  (Out): 3
+         Bytes at NS Level    ( In): 24
+         Bytes at NS Level    (Out): 11
          NS-VC Block count         : 1
          NS-VC replaced other count: 2
     VCI 0x2001, NSEI 0x2000, peer 0x01020304:1111
+         Packets at NS Level  ( In): 9
+         Packets at NS Level  (Out): 10
+         Bytes at NS Level    ( In): 39
+         Bytes at NS Level    (Out): 48
     VCI 0x1001, NSEI 0x1000, peer 0x01020304:2222
+         Packets at NS Level  ( In): 15
+         Packets at NS Level  (Out): 21
+         Bytes at NS Level    ( In): 88
+         Bytes at NS Level    (Out): 108
          NS-VC Block count         : 4
          NS-VC replaced other count: 3
          NS-VC changed NSEI count  : 4
@@ -645,13 +823,26 @@
 
 Current NS-VCIs:
     VCI 0xf001, NSEI 0x1000, peer 0x00000000:0, blocked
+         Packets at NS Level  ( In): 2
+         Packets at NS Level  (Out): 3
+         Bytes at NS Level    ( In): 24
+         Bytes at NS Level    (Out): 11
          NS-VC Block count         : 1
          NS-VC replaced other count: 2
     VCI 0x2001, NSEI 0x2000, peer 0x01020304:1111
+         Packets at NS Level  ( In): 9
+         Packets at NS Level  (Out): 10
+         Bytes at NS Level    ( In): 39
+         Bytes at NS Level    (Out): 48
     VCI 0x1001, NSEI 0x1000, peer 0x01020304:2222, blocked
+         Packets at NS Level  ( In): 17
+         Packets at NS Level  (Out): 23
+         Bytes at NS Level    ( In): 106
+         Bytes at NS Level    (Out): 121
          NS-VC Block count         : 5
          NS-VC replaced other count: 3
          NS-VC changed NSEI count  : 4
+         RESET ACK missing count   : 1
 
 Current NS-VCIs:
 
@@ -684,6 +875,10 @@
 
 Current NS-VCIs:
     VCI 0x0101, NSEI 0x0100, peer 0x05060708:32000
+         Packets at NS Level  ( In): 3
+         Packets at NS Level  (Out): 3
+         Bytes at NS Level    ( In): 11
+         Bytes at NS Level    (Out): 14
          NS-VC Block count         : 1
 
 --- RESET, SGSN -> BSS ---
@@ -702,6 +897,10 @@
 
 Current NS-VCIs:
     VCI 0x0101, NSEI 0x0100, peer 0x05060708:32000, blocked
+         Packets at NS Level  ( In): 4
+         Packets at NS Level  (Out): 5
+         Bytes at NS Level    ( In): 23
+         Bytes at NS Level    (Out): 24
          NS-VC Block count         : 1
 
 --- RESET with invalid NSEI, SGSN -> BSS ---
@@ -717,6 +916,10 @@
 
 Current NS-VCIs:
     VCI 0x0101, NSEI 0x0100, peer 0x05060708:32000, blocked
+         Packets at NS Level  ( In): 5
+         Packets at NS Level  (Out): 6
+         Bytes at NS Level    ( In): 35
+         Bytes at NS Level    (Out): 33
          NS-VC Block count         : 1
          NSEI was invalid count    : 1
 
@@ -733,6 +936,10 @@
 
 Current NS-VCIs:
     VCI 0x0101, NSEI 0x0100, peer 0x05060708:32000, blocked
+         Packets at NS Level  ( In): 6
+         Packets at NS Level  (Out): 7
+         Bytes at NS Level    ( In): 47
+         Bytes at NS Level    (Out): 42
          NS-VC Block count         : 1
          NS-VCI was invalid count  : 1
          NSEI was invalid count    : 1
@@ -753,6 +960,10 @@
 
 Current NS-VCIs:
     VCI 0x0101, NSEI 0x0100, peer 0x05060708:32000, blocked
+         Packets at NS Level  ( In): 7
+         Packets at NS Level  (Out): 9
+         Bytes at NS Level    ( In): 59
+         Bytes at NS Level    (Out): 52
          NS-VC Block count         : 1
          NS-VCI was invalid count  : 1
          NSEI was invalid count    : 1
@@ -766,6 +977,10 @@
 
 Current NS-VCIs:
     VCI 0x0101, NSEI 0x0100, peer 0x05060708:32000, blocked
+         Packets at NS Level  ( In): 8
+         Packets at NS Level  (Out): 9
+         Bytes at NS Level    ( In): 68
+         Bytes at NS Level    (Out): 52
          NS-VC Block count         : 1
          NS-VCI was invalid count  : 1
          NSEI was invalid count    : 1
@@ -783,6 +998,10 @@
 
 Current NS-VCIs:
     VCI 0x0101, NSEI 0x0100, peer 0x05060708:32000, blocked, dead
+         Packets at NS Level  ( In): 9
+         Packets at NS Level  (Out): 10
+         Bytes at NS Level    ( In): 77
+         Bytes at NS Level    (Out): 64
          NS-VC Block count         : 1
          NS-VCI was invalid count  : 1
          NSEI was invalid count    : 2
@@ -800,6 +1019,10 @@
 
 Current NS-VCIs:
     VCI 0x0101, NSEI 0x0100, peer 0x05060708:32000, blocked, dead
+         Packets at NS Level  ( In): 10
+         Packets at NS Level  (Out): 11
+         Bytes at NS Level    ( In): 86
+         Bytes at NS Level    (Out): 76
          NS-VC Block count         : 1
          NS-VCI was invalid count  : 2
          NSEI was invalid count    : 2
@@ -836,6 +1059,10 @@
 
 Current NS-VCIs:
     VCI 0x0101, NSEI 0x0100, peer 0x05060708:32000
+         Packets at NS Level  ( In): 3
+         Packets at NS Level  (Out): 3
+         Bytes at NS Level    ( In): 11
+         Bytes at NS Level    (Out): 14
          NS-VC Block count         : 1
 
 --- Time out local test procedure ---
@@ -939,6 +1166,8 @@
 
 Current NS-VCIs:
     VCI 0x0101, NSEI 0x0100, peer 0x05060708:32000, blocked, dead
+         Packets at NS Level  (Out): 1
+         Bytes at NS Level    (Out): 12
 
 --- Send message to SGSN ---
 
@@ -968,6 +1197,10 @@
 
 Current NS-VCIs:
     VCI 0x0101, NSEI 0x0100, peer 0x05060708:32000, blocked
+         Packets at NS Level  ( In): 2
+         Packets at NS Level  (Out): 3
+         Bytes at NS Level    ( In): 10
+         Bytes at NS Level    (Out): 14
          NS-VC Block count         : 1
 
 --- Send message to SGSN ---
@@ -996,6 +1229,10 @@
 
 Current NS-VCIs:
     VCI 0x0101, NSEI 0x0100, peer 0x05060708:32000
+         Packets at NS Level  ( In): 4
+         Packets at NS Level  (Out): 4
+         Bytes at NS Level    ( In): 12
+         Bytes at NS Level    (Out): 15
          NS-VC Block count         : 1
 
 --- Send message to SGSN ---
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,
diff --git a/tests/stats/stats_test.ok b/tests/stats/stats_test.ok
index a0c001b..cb9daf2 100644
--- a/tests/stats/stats_test.ok
+++ b/tests/stats/stats_test.ok
@@ -2,14 +2,14 @@
   test1: open
   test2: open
 report (initial):
-  test2: counter p= g=ctr-test.one i=2 n=ctr.a v=0 d=0
-  test1: counter p= g=ctr-test.one i=2 n=ctr.a v=0 d=0
-  test2: counter p= g=ctr-test.one i=2 n=ctr.b v=0 d=0
-  test1: counter p= g=ctr-test.one i=2 n=ctr.b v=0 d=0
-  test2: counter p= g=ctr-test.one i=1 n=ctr.a v=0 d=0
-  test1: counter p= g=ctr-test.one i=1 n=ctr.a v=0 d=0
-  test2: counter p= g=ctr-test.one i=1 n=ctr.b v=0 d=0
-  test1: counter p= g=ctr-test.one i=1 n=ctr.b v=0 d=0
+  test2: counter p= g=ctr-test:one i=2 n=ctr:a v=0 d=0
+  test1: counter p= g=ctr-test:one i=2 n=ctr:a v=0 d=0
+  test2: counter p= g=ctr-test:one i=2 n=ctr:b v=0 d=0
+  test1: counter p= g=ctr-test:one i=2 n=ctr:b v=0 d=0
+  test2: counter p= g=ctr-test:one i=1 n=ctr:a v=0 d=0
+  test1: counter p= g=ctr-test:one i=1 n=ctr:a v=0 d=0
+  test2: counter p= g=ctr-test:one i=1 n=ctr:b v=0 d=0
+  test1: counter p= g=ctr-test:one i=1 n=ctr:b v=0 d=0
   test2: item p= g=test.one i=2 n=item.a v=-1 u=ma
   test1: item p= g=test.one i=2 n=item.a v=-1 u=ma
   test2: item p= g=test.one i=2 n=item.b v=-1 u=kb
@@ -19,19 +19,19 @@
   test2: item p= g=test.one i=1 n=item.b v=-1 u=kb
   test1: item p= g=test.one i=1 n=item.b v=-1 u=kb
 report (srep1 global):
-  test2: counter p= g=ctr-test.one i=2 n=ctr.a v=0 d=0
-  test2: counter p= g=ctr-test.one i=2 n=ctr.b v=0 d=0
-  test2: counter p= g=ctr-test.one i=1 n=ctr.a v=0 d=0
-  test2: counter p= g=ctr-test.one i=1 n=ctr.b v=0 d=0
+  test2: counter p= g=ctr-test:one i=2 n=ctr:a v=0 d=0
+  test2: counter p= g=ctr-test:one i=2 n=ctr:b v=0 d=0
+  test2: counter p= g=ctr-test:one i=1 n=ctr:a v=0 d=0
+  test2: counter p= g=ctr-test:one i=1 n=ctr:b v=0 d=0
   test2: item p= g=test.one i=2 n=item.a v=-1 u=ma
   test2: item p= g=test.one i=2 n=item.b v=-1 u=kb
   test2: item p= g=test.one i=1 n=item.a v=-1 u=ma
   test2: item p= g=test.one i=1 n=item.b v=-1 u=kb
 report (srep1 peer):
-  test2: counter p= g=ctr-test.one i=2 n=ctr.a v=0 d=0
-  test2: counter p= g=ctr-test.one i=2 n=ctr.b v=0 d=0
-  test2: counter p= g=ctr-test.one i=1 n=ctr.a v=0 d=0
-  test2: counter p= g=ctr-test.one i=1 n=ctr.b v=0 d=0
+  test2: counter p= g=ctr-test:one i=2 n=ctr:a v=0 d=0
+  test2: counter p= g=ctr-test:one i=2 n=ctr:b v=0 d=0
+  test2: counter p= g=ctr-test:one i=1 n=ctr:a v=0 d=0
+  test2: counter p= g=ctr-test:one i=1 n=ctr:b v=0 d=0
   test2: item p= g=test.one i=2 n=item.a v=-1 u=ma
   test1: item p= g=test.one i=2 n=item.a v=-1 u=ma
   test2: item p= g=test.one i=2 n=item.b v=-1 u=kb
@@ -41,14 +41,14 @@
   test2: item p= g=test.one i=1 n=item.b v=-1 u=kb
   test1: item p= g=test.one i=1 n=item.b v=-1 u=kb
 report (srep1 subscriber):
-  test2: counter p= g=ctr-test.one i=2 n=ctr.a v=0 d=0
-  test1: counter p= g=ctr-test.one i=2 n=ctr.a v=0 d=0
-  test2: counter p= g=ctr-test.one i=2 n=ctr.b v=0 d=0
-  test1: counter p= g=ctr-test.one i=2 n=ctr.b v=0 d=0
-  test2: counter p= g=ctr-test.one i=1 n=ctr.a v=0 d=0
-  test1: counter p= g=ctr-test.one i=1 n=ctr.a v=0 d=0
-  test2: counter p= g=ctr-test.one i=1 n=ctr.b v=0 d=0
-  test1: counter p= g=ctr-test.one i=1 n=ctr.b v=0 d=0
+  test2: counter p= g=ctr-test:one i=2 n=ctr:a v=0 d=0
+  test1: counter p= g=ctr-test:one i=2 n=ctr:a v=0 d=0
+  test2: counter p= g=ctr-test:one i=2 n=ctr:b v=0 d=0
+  test1: counter p= g=ctr-test:one i=2 n=ctr:b v=0 d=0
+  test2: counter p= g=ctr-test:one i=1 n=ctr:a v=0 d=0
+  test1: counter p= g=ctr-test:one i=1 n=ctr:a v=0 d=0
+  test2: counter p= g=ctr-test:one i=1 n=ctr:b v=0 d=0
+  test1: counter p= g=ctr-test:one i=1 n=ctr:b v=0 d=0
   test2: item p= g=test.one i=2 n=item.a v=-1 u=ma
   test1: item p= g=test.one i=2 n=item.a v=-1 u=ma
   test2: item p= g=test.one i=2 n=item.b v=-1 u=kb
@@ -59,49 +59,49 @@
   test1: item p= g=test.one i=1 n=item.b v=-1 u=kb
 report (srep2 disabled):
   test2: close
-  test1: counter p= g=ctr-test.one i=2 n=ctr.a v=0 d=0
-  test1: counter p= g=ctr-test.one i=2 n=ctr.b v=0 d=0
-  test1: counter p= g=ctr-test.one i=1 n=ctr.a v=0 d=0
-  test1: counter p= g=ctr-test.one i=1 n=ctr.b v=0 d=0
+  test1: counter p= g=ctr-test:one i=2 n=ctr:a v=0 d=0
+  test1: counter p= g=ctr-test:one i=2 n=ctr:b v=0 d=0
+  test1: counter p= g=ctr-test:one i=1 n=ctr:a v=0 d=0
+  test1: counter p= g=ctr-test:one i=1 n=ctr:b v=0 d=0
   test1: item p= g=test.one i=2 n=item.a v=-1 u=ma
   test1: item p= g=test.one i=2 n=item.b v=-1 u=kb
   test1: item p= g=test.one i=1 n=item.a v=-1 u=ma
   test1: item p= g=test.one i=1 n=item.b v=-1 u=kb
 report (srep2 enabled, no flush forced):
   test2: open
-  test2: counter p= g=ctr-test.one i=2 n=ctr.a v=0 d=0
-  test2: counter p= g=ctr-test.one i=2 n=ctr.b v=0 d=0
-  test2: counter p= g=ctr-test.one i=1 n=ctr.a v=0 d=0
-  test2: counter p= g=ctr-test.one i=1 n=ctr.b v=0 d=0
+  test2: counter p= g=ctr-test:one i=2 n=ctr:a v=0 d=0
+  test2: counter p= g=ctr-test:one i=2 n=ctr:b v=0 d=0
+  test2: counter p= g=ctr-test:one i=1 n=ctr:a v=0 d=0
+  test2: counter p= g=ctr-test:one i=1 n=ctr:b v=0 d=0
   test2: item p= g=test.one i=2 n=item.a v=-1 u=ma
   test2: item p= g=test.one i=2 n=item.b v=-1 u=kb
   test2: item p= g=test.one i=1 n=item.a v=-1 u=ma
   test2: item p= g=test.one i=1 n=item.b v=-1 u=kb
 report (should be empty):
 report (group 1, counter 1 update):
-  test2: counter p= g=ctr-test.one i=1 n=ctr.a v=1 d=1
-  test1: counter p= g=ctr-test.one i=1 n=ctr.a v=1 d=1
+  test2: counter p= g=ctr-test:one i=1 n=ctr:a v=1 d=1
+  test1: counter p= g=ctr-test:one i=1 n=ctr:a v=1 d=1
 report (group 1, item 1 update):
   test2: item p= g=test.one i=1 n=item.a v=10 u=ma
   test1: item p= g=test.one i=1 n=item.a v=10 u=ma
 report (remove statg1, ctrg1):
-  test2: counter p= g=ctr-test.one i=2 n=ctr.a v=0 d=0
-  test1: counter p= g=ctr-test.one i=2 n=ctr.a v=0 d=0
-  test2: counter p= g=ctr-test.one i=2 n=ctr.b v=0 d=0
-  test1: counter p= g=ctr-test.one i=2 n=ctr.b v=0 d=0
+  test2: counter p= g=ctr-test:one i=2 n=ctr:a v=0 d=0
+  test1: counter p= g=ctr-test:one i=2 n=ctr:a v=0 d=0
+  test2: counter p= g=ctr-test:one i=2 n=ctr:b v=0 d=0
+  test1: counter p= g=ctr-test:one i=2 n=ctr:b v=0 d=0
   test2: item p= g=test.one i=2 n=item.a v=-1 u=ma
   test1: item p= g=test.one i=2 n=item.a v=-1 u=ma
   test2: item p= g=test.one i=2 n=item.b v=-1 u=kb
   test1: item p= g=test.one i=2 n=item.b v=-1 u=kb
 report (remove srep1):
   test1: close
-  test2: counter p= g=ctr-test.one i=2 n=ctr.a v=0 d=0
-  test2: counter p= g=ctr-test.one i=2 n=ctr.b v=0 d=0
+  test2: counter p= g=ctr-test:one i=2 n=ctr:a v=0 d=0
+  test2: counter p= g=ctr-test:one i=2 n=ctr:b v=0 d=0
   test2: item p= g=test.one i=2 n=item.a v=-1 u=ma
   test2: item p= g=test.one i=2 n=item.b v=-1 u=kb
 report (remove statg2):
-  test2: counter p= g=ctr-test.one i=2 n=ctr.a v=0 d=0
-  test2: counter p= g=ctr-test.one i=2 n=ctr.b v=0 d=0
+  test2: counter p= g=ctr-test:one i=2 n=ctr:a v=0 d=0
+  test2: counter p= g=ctr-test:one i=2 n=ctr:b v=0 d=0
 report (remove srep2):
   test2: close
 report (remove ctrg2, should be empty):

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I24a556f447cfac25efb6e83cac2d0c2972d98fe3
Gerrit-PatchSet: 1
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>


More information about the gerrit-log mailing list