Collect reductions per process.
[beam_stats.git] / src / beam_stats.erl
1 -module(beam_stats).
2
3 -include("include/beam_stats.hrl").
4
5 -export_type(
6 [ t/0
7 ]).
8
9 -export(
10 [ collect/1
11 ]).
12
13 -define(T, #?MODULE).
14
15 -type t() ::
16 ?T{}.
17
18 -spec collect(beam_stats_delta:t()) ->
19 t().
20 collect(DeltasServer) ->
21 { {io_bytes_in , DeltaOfIOBytesIn}
22 , {io_bytes_out , DeltaOfIOBytesOut}
23 } = beam_stats_delta:of_io(DeltasServer),
24 ?T
25 { timestamp = beam_stats_source:os_timestamp()
26 , node_id = beam_stats_source:erlang_node()
27 , memory = beam_stats_source:erlang_memory()
28 , io_bytes_in = DeltaOfIOBytesIn
29 , io_bytes_out = DeltaOfIOBytesOut
30 , context_switches = beam_stats_delta:of_context_switches(DeltasServer)
31 , reductions = beam_stats_delta:of_reductions(DeltasServer)
32 , run_queue = beam_stats_source:erlang_statistics(run_queue)
33 , ets = beam_stats_ets:collect()
34 , processes = beam_stats_processes:collect(DeltasServer)
35 }.
This page took 0.070223 seconds and 4 git commands to generate.