-record(beam_stats,
{ timestamp :: erlang:timestamp()
, node_id :: atom()
- , memory :: [{erlang:memory_type(), non_neg_integer()}]
+ , memory :: [{atom(), non_neg_integer()}]
%, statistics :: [{atom() , term()}]
%, system :: [{atom() , term()}]
%, process :: [{atom() , term()}]
-record(state,
{ connect_options = [] :: [connect_option()]
- , sock = none :: hope_option:t(gen_tcp:socket())
+ , sock = none :: hope_option:t(Socket :: port())
}).
-type state() ::
Msgs2 = [statsd_msg_add_name_prefix(M, NodeIDBin) || M <- Msgs1],
[statsd_msg_to_bin(M) || M <- Msgs2].
--spec memory_to_msgs(erlang:memory()) ->
+-spec memory_to_msgs([{atom(), non_neg_integer()}]) ->
[statsd_msg()].
memory_to_msgs(Memory) ->
[memory_component_to_statsd_msg(MC) || MC <- Memory].
--spec memory_component_to_statsd_msg({erlang:memory_type(), non_neg_integer()}) ->
+-spec memory_component_to_statsd_msg({atom(), non_neg_integer()}) ->
statsd_msg().
memory_component_to_statsd_msg({MemType, MemSize}) when MemSize >= 0 ->
#statsd_msg