diff options
author | Simon MacMullen <simon@rabbitmq.com> | 2010-07-19 17:13:40 +0100 |
---|---|---|
committer | Simon MacMullen <simon@rabbitmq.com> | 2010-07-19 17:13:40 +0100 |
commit | 2bc1bc06e8a15f32d65413f4aacd3c1a3c929feb (patch) | |
tree | a36f1d7e34e069f1898e38ded9802e63ddc5b16b | |
parent | d449558d35b786d3e0ab6ea7981fdc2527d978e5 (diff) | |
download | rabbitmq-server-2bc1bc06e8a15f32d65413f4aacd3c1a3c929feb.tar.gz |
The channel has a few statistics / state of its own too.
-rw-r--r-- | src/rabbit_channel.erl | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl index b0ccf9fb..d99a1c03 100644 --- a/src/rabbit_channel.erl +++ b/src/rabbit_channel.erl @@ -56,18 +56,21 @@ -define(MAX_PERMISSION_CACHE_SIZE, 12). -define(FLOW_OK_TIMEOUT, 10000). %% 10 seconds --define(INFO_KEYS, +-define(STATISTICS_KEYS, [pid, - connection, - number, - user, - vhost, transactional, consumer_count, messages_unacknowledged, acks_uncommitted, prefetch_count]). +-define(INFO_KEYS, + [connection, + number, + user, + vhost] + ++ ?STATISTICS_KEYS). + %%---------------------------------------------------------------------------- -ifdef(use_specs). @@ -1190,9 +1193,9 @@ maybe_emit_stats(State = #ch{exchange_statistics = ExchangeStatistics, true -> rabbit_event:notify( channel_stats, - [{pid, self()}, - {per_exchange_statistics, dict:to_list(ExchangeStatistics)}, - {per_queue_statistics, dict:to_list(QueueStatistics)}]), + [{Item, i(Item, State)} || Item <- ?STATISTICS_KEYS] ++ + [{per_exchange_statistics, dict:to_list(ExchangeStatistics)}, + {per_queue_statistics, dict:to_list(QueueStatistics)}]), State#ch{last_statistics_update = Now}; _ -> State |