From 4b97ff92a8d2d429370da40c9845199c2a68f12d Mon Sep 17 00:00:00 2001 From: Boshan Sun Date: Thu, 22 Mar 2018 19:47:04 -0700 Subject: Fix sys's debug statistics. Currently, in sys:stat/2, the message out only count for system events with format {out, Msg, To}. However, the gen_server:reply/5 will call sys:handle_debug/4 with format {out, Reply, To, State}. That will make the message out count fail to pattern matching. Also update sys_SUITE.erl and relevant docs. --- lib/stdlib/test/sys_SUITE.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/stdlib/test') diff --git a/lib/stdlib/test/sys_SUITE.erl b/lib/stdlib/test/sys_SUITE.erl index b44df0fbda..a28eca513f 100644 --- a/lib/stdlib/test/sys_SUITE.erl +++ b/lib/stdlib/test/sys_SUITE.erl @@ -84,7 +84,7 @@ stats(Config) when is_list(Config) -> {ok,-44} = public_call(44), {ok,Stats} = sys:statistics(?server,get), true = lists:member({messages_in,1}, Stats), - true = lists:member({messages_out,0}, Stats), + true = lists:member({messages_out,1}, Stats), ok = sys:statistics(?server,false), {status,_Pid,{module,_Mod},[_PDict,running,Self,_,_]} = sys:get_status(?server), -- cgit v1.2.3