aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bsc/bts.c
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2021-09-27 08:56:20 +0200
committerneels <nhofmeyr@sysmocom.de>2021-11-10 13:27:43 +0000
commit41f143827d4233963b3a1b5e6a98ea7efa0f0fe1 (patch)
treeedb3f1f39cdad32d21792c841f1d0fcc0ede639c /src/osmo-bsc/bts.c
parente0458c2e005de048ac2940875ee2e20ad497c891 (diff)
implement all_allocated:{sdcch,tch} rate counters
Based on allAvailable{SDCCH,TCH}Allocated performance indicators, see 3GPP TS 52.402. Related: SYS#4878 Related: Ib3997a827c9cc43d1361bb0cf3bfab9f6d91bf82 (osmo-ttcn3-hacks) Change-Id: I8b06e435a224c8708cd6c67e97ee5413718fc1ed
Diffstat (limited to 'src/osmo-bsc/bts.c')
-rw-r--r--src/osmo-bsc/bts.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/osmo-bsc/bts.c b/src/osmo-bsc/bts.c
index 570195778..880cb22a6 100644
--- a/src/osmo-bsc/bts.c
+++ b/src/osmo-bsc/bts.c
@@ -211,6 +211,29 @@ struct gsm_bts *gsm_bts_alloc(struct gsm_network *net, struct gsm_bts_sm *bts_sm
}
bts->bts_statg = osmo_stat_item_group_alloc(bts, &bts_statg_desc, bts->nr);
+ bts->all_allocated_sdcch = (struct time_cc){
+ .cfg = {
+ .gran_usec = 1*1000000,
+ .forget_sum_usec = 60*1000000,
+ .rate_ctr = rate_ctr_group_get_ctr(bts->bts_ctrs, BTS_CTR_ALL_ALLOCATED_SDCCH),
+ .T_gran = -16,
+ .T_round_threshold = -17,
+ .T_forget_sum = -18,
+ .T_defs = net->T_defs,
+ },
+ };
+ bts->all_allocated_tch = (struct time_cc){
+ .cfg = {
+ .gran_usec = 1*1000000,
+ .forget_sum_usec = 60*1000000,
+ .rate_ctr = rate_ctr_group_get_ctr(bts->bts_ctrs, BTS_CTR_ALL_ALLOCATED_TCH),
+ .T_gran = -16,
+ .T_round_threshold = -17,
+ .T_forget_sum = -18,
+ .T_defs = net->T_defs,
+ },
+ };
+
/* create our primary TRX */
bts->c0 = gsm_bts_trx_alloc(bts);
if (!bts->c0) {
@@ -1236,6 +1259,12 @@ const struct rate_ctr_desc bts_ctr_description[] = {
[BTS_CTR_SRVCC_ERROR] = \
{ "srvcc:error",
"Re-assignment failed for other reason" },
+ [BTS_CTR_ALL_ALLOCATED_SDCCH] = \
+ { "all_allocated:sdcch",
+ "Cumulative counter of seconds where all SDCCH channels were allocated" },
+ [BTS_CTR_ALL_ALLOCATED_TCH] = \
+ { "all_allocated:tch",
+ "Cumulative counter of seconds where all TCH channels were allocated" },
};
const struct rate_ctr_group_desc bts_ctrg_desc = {