Implement global queue size query in channel.c

This commit is contained in:
Andrea Shepard 2013-11-11 21:50:16 -08:00
parent 8852a1794c
commit 2fc3da3ff5
2 changed files with 11 additions and 0 deletions

View file

@ -4035,6 +4035,16 @@ channel_mark_outgoing(channel_t *chan)
* Flow control queries * * Flow control queries *
***********************/ ***********************/
/*
* Get the latest estimate for the total queue size of all open channels
*/
uint64_t
channel_get_global_queue_estimate(void)
{
return estimated_total_queue_size;
}
/* /*
* Estimate the number of writeable cells * Estimate the number of writeable cells
* *

View file

@ -484,6 +484,7 @@ void channel_listener_dump_transport_statistics(channel_listener_t *chan_l,
int severity); int severity);
/* Flow control queries */ /* Flow control queries */
uint64_t channel_get_global_queue_estimate(void);
int channel_num_cells_writeable(channel_t *chan); int channel_num_cells_writeable(channel_t *chan);
/* Timestamp queries */ /* Timestamp queries */