Merge branch 'zhongwencool-master'
diff --git a/README.md b/README.md
index 284cd7d..02058e4 100644
--- a/README.md
+++ b/README.md
@@ -27,6 +27,9 @@
*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
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 @@
%% @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 @@
%% 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_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).