From b2de00fe8923a1329f9a0fbee895704393c42aeb Mon Sep 17 00:00:00 2001 From: zhongwencool Date: Sun, 22 Apr 2018 09:33:49 +0800 Subject: [PATCH 1/2] fixed recon:node_stats/4 first incremental value (io,gc) compare wrong way) --- src/recon.app.src | 2 +- src/recon.erl | 7 ------- src/recon_lib.erl | 2 +- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/src/recon.app.src b/src/recon.app.src index 11a11bb..8f0dcd6 100644 --- a/src/recon.app.src +++ b/src/recon.app.src @@ -1,6 +1,6 @@ {application, recon, [{description, "Diagnostic tools for production use"}, - {vsn, "2.3.4"}, + {vsn, "2.3.5"}, {modules, [recon, recon_alloc, recon_lib, recon_trace]}, {registered, []}, {applications, [kernel, stdlib]}, diff --git a/src/recon.erl b/src/recon.erl index 0fbcc87..9b43ce0 100644 --- a/src/recon.erl +++ b/src/recon.erl @@ -253,9 +253,6 @@ proc_fake([_|T1], [H|T2]) -> %% @doc Fetches a given attribute from all processes (except the %% caller) and returns the biggest `Num' consumers. -%% @todo Implement this function so it only stores `Num' entries in -%% memory at any given time, instead of as many as there are -%% processes. -spec proc_count(AttributeName, Num) -> [proc_attrs()] when AttributeName :: atom(), Num :: non_neg_integer(). @@ -535,10 +532,6 @@ port_types() -> %% of packets sent, received, or both (`send_cnt', `recv_cnt', `cnt', %% respectively). Individual absolute values for each metric will be returned %% in the 3rd position of the resulting tuple. -%% -%% @todo Implement this function so it only stores `Num' entries in -%% memory at any given time, instead of as many as there are -%% processes. -spec inet_count(AttributeName, Num) -> [inet_attrs()] when AttributeName :: 'recv_cnt' | 'recv_oct' | 'send_cnt' | 'send_oct' | 'cnt' | 'oct', diff --git a/src/recon_lib.erl b/src/recon_lib.erl index 2bbe39b..021cc4e 100644 --- a/src/recon_lib.erl +++ b/src/recon_lib.erl @@ -205,8 +205,8 @@ time_map(N, Interval, Fun, State, MapFun) -> time_fold(0, _, _, _, _, Acc) -> Acc; time_fold(N, Interval, Fun, State, FoldFun, Init) -> - {Res, NewState} = Fun(State), timer:sleep(Interval), + {Res, NewState} = Fun(State), Acc = FoldFun(Res,Init), time_fold(N-1,Interval,Fun,NewState,FoldFun,Acc). From dc6960458759b4df1e1aaf20bd970122a693e42a Mon Sep 17 00:00:00 2001 From: Fred Hebert Date: Sun, 22 Apr 2018 09:22:34 -0400 Subject: [PATCH 2/2] Update README --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 284cd7d..02058e4 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,9 @@ all stable changes of the first version of Recon. *2.x* +- 2.3.5 + - fixing timefold's first iteration to prevent errors at call-site + by sleeping before sampling - 2.3.4 - fixing edoc tag that broke some downstream packaging attempts - 2.3.3