{ timestamp = Timestamp
, node_id = _
, memory = Memory
- % TODO: Handle the rest of data point
+ % TODO: Handle the rest of data points
+ , io_bytes_in = IOBytesIn
+ , io_bytes_out = IOBytesOut
+ , context_switches = ContextSwitches
+ , reductions = Reductions
+ , run_queue = RunQueue
+ , ets = _ETS
+ , processes = _Processes
},
<<NodeID/binary>>
) ->
- of_memory(Memory, NodeID, Timestamp).
+ Ts = Timestamp,
+ N = NodeID,
+ [ cons([N, <<"io">> , <<"bytes_in">> ], IOBytesIn , Ts)
+ , cons([N, <<"io">> , <<"bytes_out">>], IOBytesOut , Ts)
+ , cons([N, <<"context_switches">> ], ContextSwitches, Ts)
+ , cons([N, <<"reductions">> ], Reductions , Ts)
+ , cons([N, <<"run_queue">> ], RunQueue , Ts)
+ | of_memory(Memory, NodeID, Ts)
+ ].
-spec of_memory([{atom(), non_neg_integer()}], binary(), erlang:timestamp()) ->
[t()].
end,
lists:map(ComponentToMessage, Memory).
+-spec cons([binary()], integer(), erlang:timestamp()) ->
+ t().
+cons(Path, Value, Timestamp) ->
+ ?T
+ { path = Path
+ , value = Value
+ , timestamp = Timestamp
+ }.
+
-spec node_id_to_bin(node()) ->
binary().
node_id_to_bin(NodeID) ->