X-Git-Url: https://git.xandkar.net/?a=blobdiff_plain;f=src%2Fbeam_stats_processes.erl;h=d369314251867a469377bcf3499a90f4869bddc6;hb=7dbc59b67d2cebe0e498ac4fd167cbaabed0e55b;hp=90c38868c8d48bd1083158c27bcb3d2bdd43dac6;hpb=aa4143aa361a537ab11a8145846bd4ddfad1f56e;p=beam_stats.git diff --git a/src/beam_stats_processes.erl b/src/beam_stats_processes.erl index 90c3886..d369314 100644 --- a/src/beam_stats_processes.erl +++ b/src/beam_stats_processes.erl @@ -8,8 +8,8 @@ ]). -export( - [ collect/0 - , collect_and_print/0 + [ collect/1 + , collect_and_print/1 , print/1 ]). @@ -18,11 +18,12 @@ -type t() :: ?T{}. --spec collect() -> +-spec collect(beam_stats_delta:t()) -> t(). -collect() -> +collect(DeltasServer) -> Pids = beam_stats_source:erlang_processes(), - Ps = [beam_stats_process:of_pid(P) || P <- Pids], + PsOpts = [beam_stats_process:of_pid(P, DeltasServer) || P <- Pids], + Ps = [P || {some, P} <- PsOpts], ?T { individual_stats = Ps @@ -44,8 +45,10 @@ collect() -> = length([P || P <- Ps, P#beam_stats_process.status =:= waiting]) }. -collect_and_print() -> - print(collect()). +-spec collect_and_print(beam_stats_delta:t()) -> + ok. +collect_and_print(DeltasServer) -> + print(collect(DeltasServer)). -spec print(t()) -> ok.