[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/master] Implement global queue size query in channel.c
commit 2fc3da3ff51f3fe7fa5338c2d6b52a06ed9c4f19
Author: Andrea Shepard <andrea@xxxxxxxxxxxxxx>
Date: Mon Nov 11 21:50:16 2013 -0800
Implement global queue size query in channel.c
---
src/or/channel.c | 10 ++++++++++
src/or/channel.h | 1 +
2 files changed, 11 insertions(+)
diff --git a/src/or/channel.c b/src/or/channel.c
index f729a17..e2d102d 100644
--- a/src/or/channel.c
+++ b/src/or/channel.c
@@ -4036,6 +4036,16 @@ channel_mark_outgoing(channel_t *chan)
***********************/
/*
+ * 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
*
* Ask the lower layer for an estimate of how many cells it can accept, and
diff --git a/src/or/channel.h b/src/or/channel.h
index 388c729..18f7cfc 100644
--- a/src/or/channel.h
+++ b/src/or/channel.h
@@ -484,6 +484,7 @@ void channel_listener_dump_transport_statistics(channel_listener_t *chan_l,
int severity);
/* Flow control queries */
+uint64_t channel_get_global_queue_estimate(void);
int channel_num_cells_writeable(channel_t *chan);
/* Timestamp queries */
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits