[t()].
of_process(
#beam_stats_process
- { pid = Pid
+ { pid = _
, memory = Memory
, total_heap_size = TotalHeapSize
, stack_size = StackSize
) ->
Origin = beam_stats_process:get_best_known_origin(Process),
OriginBin = proc_origin_to_bin(Origin),
- PidBin = pid_to_bin(Pid),
- OriginAndPid = [OriginBin, PidBin],
Ts = Timestamp,
N = NodeID,
- [ cons([N, <<"process_memory">> | OriginAndPid], Memory , Ts)
- , cons([N, <<"process_total_heap_size">> | OriginAndPid], TotalHeapSize , Ts)
- , cons([N, <<"process_stack_size">> | OriginAndPid], StackSize , Ts)
- , cons([N, <<"process_message_queue_len">> | OriginAndPid], MsgQueueLen , Ts)
+ [ cons([N, <<"process_memory">> , OriginBin], Memory , Ts)
+ , cons([N, <<"process_total_heap_size">> , OriginBin], TotalHeapSize , Ts)
+ , cons([N, <<"process_stack_size">> , OriginBin], StackSize , Ts)
+ , cons([N, <<"process_message_queue_len">> , OriginBin], MsgQueueLen , Ts)
].
-spec proc_origin_to_bin(beam_stats_process:best_known_origin()) ->
binary().
proc_origin_to_bin({registered_name, Name}) ->
- atom_to_binary(Name, utf8);
+ NameBin = atom_to_binary(Name, utf8),
+ <<"named--", NameBin/binary>>;
proc_origin_to_bin({ancestry, Ancestry}) ->
#beam_stats_process_ancestry
{ raw_initial_call = InitCallRaw
AncestorsBinOpt = hope_option:map(AncestorsOpt , fun ancestors_to_bin/1),
AncestorsBin = hope_option:get(AncestorsBinOpt , Blank),
InitCallRawBin = mfa_to_bin(InitCallRaw),
- << InitCallRawBin/binary
+ << "spawned-via--"
+ , InitCallRawBin/binary
, "--"
, InitCallOTPBin/binary
, "--"