comparison src/twjit_out.c @ 11:4f82b9c07ddb

twjit: update to stats
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 06 Jul 2024 01:57:52 +0000
parents 1bb26347e253
children 323957bebd53
comparison
equal deleted inserted replaced
10:e60df79cbe9f 11:4f82b9c07ddb
40 OSMO_ASSERT(sb->depth > 0); 40 OSMO_ASSERT(sb->depth > 0);
41 msg = llist_entry(sb->queue.next, struct msgb, list); 41 msg = llist_entry(sb->queue.next, struct msgb, list);
42 if (msg->cb[0] == sb->head_ts) { 42 if (msg->cb[0] == sb->head_ts) {
43 llist_del(&msg->list); 43 llist_del(&msg->list);
44 twjit->stats.delivered_pkt++; 44 twjit->stats.delivered_pkt++;
45 twjit->stats.delivered_bytes += msg->len;
46 } else { 45 } else {
47 msg = NULL; 46 msg = NULL;
48 twjit->stats.output_gaps++; 47 twjit->stats.output_gaps++;
49 } 48 }
50 sb->head_ts += twjit->ts_quantum; 49 sb->head_ts += twjit->ts_quantum;
98 read_sb_thinning(twjit); 97 read_sb_thinning(twjit);
99 return pull_from_read_sb(twjit); 98 return pull_from_read_sb(twjit);
100 case TWJIT_STATE_HANDOVER: 99 case TWJIT_STATE_HANDOVER:
101 if (starting_sb_is_ready(twjit)) { 100 if (starting_sb_is_ready(twjit)) {
102 toss_read_queue(twjit); 101 toss_read_queue(twjit);
102 twjit->stats.handovers_out++;
103 twjit->state = TWJIT_STATE_FLOWING; 103 twjit->state = TWJIT_STATE_FLOWING;
104 twjit->read_sb = twjit->write_sb; 104 twjit->read_sb = twjit->write_sb;
105 return pull_from_read_sb(twjit); 105 return pull_from_read_sb(twjit);
106 } 106 }
107 if (read_sb_is_empty(twjit)) { 107 if (read_sb_is_empty(twjit)) {