Skip to content
This repository was archived by the owner on Nov 17, 2020. It is now read-only.

Commit 9a52e09

Browse files
author
Daniil Fedotov
committed
report reductions and garbage collection options in connection stats
1 parent 08e5b96 commit 9a52e09

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/rabbit_reader.erl

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,8 @@
153153
}).
154154

155155
-define(STATISTICS_KEYS, [pid, recv_oct, recv_cnt, send_oct, send_cnt,
156-
send_pend, state, channels]).
156+
send_pend, state, channels, reductions,
157+
garbage_collection]).
157158

158159
-define(CREATION_EVENT_KEYS,
159160
[pid, name, port, peer_port, host,
@@ -1407,6 +1408,12 @@ i(state, #v1{connection_state = ConnectionState,
14071408
true -> flow;
14081409
false -> ConnectionState
14091410
end;
1411+
i(reductions, _S) ->
1412+
{reductions, Red} = erlang:process_info(self(), reductions),
1413+
Red;
1414+
i(garbage_collection, _S) ->
1415+
{garbage_collection, GC} = erlang:process_info(self(), garbage_collection),
1416+
GC;
14101417
i(Item, #v1{connection = Conn}) -> ic(Item, Conn).
14111418

14121419
ic(name, #connection{name = Name}) -> Name;

0 commit comments

Comments
 (0)