diff options
author | Alexander Couzens <lynxis@fe80.eu> | 2016-07-12 15:42:02 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2016-08-27 01:58:19 +0000 |
commit | 20423ea6cfdecd264b32c7fe5e15ee7de4455692 (patch) | |
tree | e62843a1ddcb0fc97891be516d57df4565de1447 /openbsc/src/libbsc/net_init.c | |
parent | 4e699a9cbf418518265dc7b8b6b7fe250d87222d (diff) |
libbsc/libmsc: convert old osmo counter into rate_ctrgs
rate counters support the export to statsd and can have a delta value.
Change-Id: Ie749cebd53a0bb618d0e23d375885712078bf8dd
Diffstat (limited to 'openbsc/src/libbsc/net_init.c')
-rw-r--r-- | openbsc/src/libbsc/net_init.c | 32 |
1 files changed, 2 insertions, 30 deletions
diff --git a/openbsc/src/libbsc/net_init.c b/openbsc/src/libbsc/net_init.c index 6d03ee428..b99f3d2a0 100644 --- a/openbsc/src/libbsc/net_init.c +++ b/openbsc/src/libbsc/net_init.c @@ -80,36 +80,8 @@ struct gsm_network *gsm_network_init(uint16_t country_code, uint16_t network_cod INIT_LLIST_HEAD(&net->upqueue); INIT_LLIST_HEAD(&net->bts_list); - net->stats.chreq.total = osmo_counter_alloc("net.chreq.total"); - net->stats.chreq.no_channel = osmo_counter_alloc("net.chreq.no_channel"); - net->stats.handover.attempted = osmo_counter_alloc("net.handover.attempted"); - net->stats.handover.no_channel = osmo_counter_alloc("net.handover.no_channel"); - net->stats.handover.timeout = osmo_counter_alloc("net.handover.timeout"); - net->stats.handover.completed = osmo_counter_alloc("net.handover.completed"); - net->stats.handover.failed = osmo_counter_alloc("net.handover.failed"); - net->stats.loc_upd_type.attach = osmo_counter_alloc("net.loc_upd_type.attach"); - net->stats.loc_upd_type.normal = osmo_counter_alloc("net.loc_upd_type.normal"); - net->stats.loc_upd_type.periodic = osmo_counter_alloc("net.loc_upd_type.periodic"); - net->stats.loc_upd_type.detach = osmo_counter_alloc("net.imsi_detach.count"); - net->stats.loc_upd_resp.reject = osmo_counter_alloc("net.loc_upd_resp.reject"); - net->stats.loc_upd_resp.accept = osmo_counter_alloc("net.loc_upd_resp.accept"); - net->stats.paging.attempted = osmo_counter_alloc("net.paging.attempted"); - net->stats.paging.detached = osmo_counter_alloc("net.paging.detached"); - net->stats.paging.completed = osmo_counter_alloc("net.paging.completed"); - net->stats.paging.expired = osmo_counter_alloc("net.paging.expired"); - net->stats.sms.submitted = osmo_counter_alloc("net.sms.submitted"); - net->stats.sms.no_receiver = osmo_counter_alloc("net.sms.no_receiver"); - net->stats.sms.delivered = osmo_counter_alloc("net.sms.delivered"); - net->stats.sms.rp_err_mem = osmo_counter_alloc("net.sms.rp_err_mem"); - net->stats.sms.rp_err_other = osmo_counter_alloc("net.sms.rp_err_other"); - net->stats.call.mo_setup = osmo_counter_alloc("net.call.mo_setup"); - net->stats.call.mo_connect_ack = osmo_counter_alloc("net.call.mo_connect_ack"); - net->stats.call.mt_setup = osmo_counter_alloc("net.call.mt_setup"); - net->stats.call.mt_connect = osmo_counter_alloc("net.call.mt_connect"); - net->stats.chan.rf_fail = osmo_counter_alloc("net.chan.rf_fail"); - net->stats.chan.rll_err = osmo_counter_alloc("net.chan.rll_err"); - net->stats.bts.oml_fail = osmo_counter_alloc("net.bts.oml_fail"); - net->stats.bts.rsl_fail = osmo_counter_alloc("net.bts.rsl_fail"); + /* init statistics */ + net->ratectrs = rate_ctr_group_alloc(net, &msc_ctrg_desc, 0); net->mncc_recv = mncc_recv; net->ext_min = GSM_MIN_EXTEN; |