-spec stats/1

This commit is contained in:
Feng 2016-01-23 22:52:50 +08:00
parent f2267f594f
commit fb32c509ce
1 changed files with 2 additions and 0 deletions

View File

@ -147,6 +147,8 @@ len(#mqueue{type = priority, q = Q}) -> priority_queue:len(Q).
max_len(#mqueue{max_len= MaxLen}) -> MaxLen. max_len(#mqueue{max_len= MaxLen}) -> MaxLen.
%% @doc Stats of the mqueue
-spec stats(mqueue()) -> [stat()].
stats(#mqueue{type = Type, q = Q, max_len = MaxLen, len = Len, dropped = Dropped}) -> stats(#mqueue{type = Type, q = Q, max_len = MaxLen, len = Len, dropped = Dropped}) ->
[{len, case Type of [{len, case Type of
simple -> Len; simple -> Len;