Consolidate data source calls in 1, mockable, module.
[beam_stats.git] / src / beam_stats_processes.erl
index 2505178..90c3886 100644 (file)
@@ -21,7 +21,8 @@
 -spec collect() ->
     t().
 collect() ->
-    Ps = [beam_stats_process:of_pid(P) || P <- erlang:processes()],
+    Pids = beam_stats_source:erlang_processes(),
+    Ps = [beam_stats_process:of_pid(P) || P <- Pids],
     ?T
     { individual_stats
         = Ps
@@ -32,7 +33,7 @@ collect() ->
     , count_garbage_collecting
         = length([P || P <- Ps, P#beam_stats_process.status =:= garbage_collecting])
     , count_registered
-        = length(registered())
+        = length(beam_stats_source:erlang_registered())
     , count_runnable
         = length([P || P <- Ps, P#beam_stats_process.status =:= runnable])
     , count_running
This page took 0.021431 seconds and 4 git commands to generate.