diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_channel.erl | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl index dae0612e03..c8b497ec9c 100644 --- a/src/rabbit_channel.erl +++ b/src/rabbit_channel.erl @@ -2008,6 +2008,10 @@ emit_stats(State) -> emit_stats(State, []). emit_stats(State, Extra) -> [{reductions, Red} | Coarse0] = infos(?STATISTICS_KEYS, State), + %% First metric must be `idle_since` (if available), as expected by + %% `rabbit_mgmt_format:format_channel_stats`. This is a performance + %% optimisation that avoids traversing the whole list when only + %% one element has to be formatted. rabbit_core_metrics:channel_stats(self(), Extra ++ Coarse0), rabbit_core_metrics:channel_stats(reductions, self(), Red). |
