Remove inc_stats/1 function

This commit is contained in:
Feng 2017-02-22 22:24:23 +08:00
parent 5d5de51f89
commit b8084f2989
1 changed files with 3 additions and 3 deletions

View File

@ -19,7 +19,7 @@
-author("Feng Lee <feng@emqtt.io>").
-export([merge_opts/2, start_timer/2, start_timer/3, cancel_timer/1,
proc_stats/0, proc_stats/1, inc_stats/1]).
proc_stats/0, proc_stats/1]).
%% @doc Merge Options
merge_opts(Defaults, Options) ->
@ -53,13 +53,13 @@ cancel_timer(Timer) ->
_ -> ok
end.
-spec(proc_stats() -> list()).
proc_stats() ->
proc_stats(self()).
-spec(proc_stats(pid()) -> list()).
proc_stats(Pid) ->
Stats = process_info(Pid, [message_queue_len, heap_size, reductions]),
{value, {_, V}, Stats1} = lists:keytake(message_queue_len, 1, Stats),
[{mailbox_len, V} | Stats1].
inc_stats(Key) -> put(Key, get(Key) + 1).