Rename 'mailbox_len' to 'message_queue_len'
This commit is contained in:
parent
89b03eb9a6
commit
7b1a80c265
|
@ -116,17 +116,19 @@ cancel_timer(_) -> ok.
|
||||||
proc_name(Mod, Id) ->
|
proc_name(Mod, Id) ->
|
||||||
list_to_atom(lists:concat([Mod, "_", Id])).
|
list_to_atom(lists:concat([Mod, "_", Id])).
|
||||||
|
|
||||||
-spec(proc_stats() -> list()).
|
%% Get Proc's Stats.
|
||||||
proc_stats() ->
|
-spec(proc_stats() -> emqx_types:stats()).
|
||||||
proc_stats(self()).
|
proc_stats() -> proc_stats(self()).
|
||||||
|
|
||||||
-spec(proc_stats(pid()) -> list()).
|
-spec(proc_stats(pid()) -> emqx_types:stats()).
|
||||||
proc_stats(Pid) ->
|
proc_stats(Pid) ->
|
||||||
case process_info(Pid, [message_queue_len, heap_size,
|
case process_info(Pid, [message_queue_len,
|
||||||
total_heap_size, reductions, memory]) of
|
heap_size,
|
||||||
|
total_heap_size,
|
||||||
|
reductions,
|
||||||
|
memory]) of
|
||||||
undefined -> [];
|
undefined -> [];
|
||||||
[{message_queue_len, Len}|Stats] ->
|
ProcStats -> ProcStats
|
||||||
[{mailbox_len, Len}|Stats]
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
%% @doc Drain delivers from the channel's mailbox.
|
%% @doc Drain delivers from the channel's mailbox.
|
||||||
|
|
Loading…
Reference in New Issue