diff options
author | Pablo Neira Ayuso <pablo@soleta.eu> | 2014-08-28 16:14:16 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@soleta.eu> | 2014-08-28 16:14:16 +0200 |
commit | 843c23098aba4c146c495af5f1dcfa35b579dc34 (patch) | |
tree | dfbd91c8615533dfba6fa76b651430e8fa84a921 /src | |
parent | 7a990e8e53d75fb58f72f5cc8dd613c528eda422 (diff) |
osmux: add statistics to osmux_in_handle struct
Add statistics to the osmux input handle, which translates the RTP
messages to osmux batch.
Diffstat (limited to 'src')
-rw-r--r-- | src/osmux.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/osmux.c b/src/osmux.c index b699cd1..8ff5274 100644 --- a/src/osmux.c +++ b/src/osmux.c @@ -327,6 +327,10 @@ void osmux_xfrm_input_deliver(struct osmux_in_handle *h) LOGP(DLMIB, LOGL_DEBUG, "invoking delivery function\n"); batch_msg = osmux_build_batch(h); + + h->stats.output_osmux_msgs++; + h->stats.output_osmux_bytes += batch_msg->len; + h->deliver(batch_msg, h->data); osmo_timer_del(&batch->timer); batch->remaining_bytes = h->batch_size; @@ -536,6 +540,9 @@ int osmux_xfrm_input(struct osmux_in_handle *h, struct msgb *msg, int ccid) if (ret < 0) return 0; + h->stats.input_rtp_msgs++; + h->stats.input_rtp_bytes += msg->len; + if (first_rtp_msg) { LOGP(DLMIB, LOGL_DEBUG, "osmux start timer batch\n"); |