From: Siraaj Khandkar Date: Tue, 11 Aug 2015 21:21:37 +0000 (-0400) Subject: Fix unknown types. X-Git-Tag: 0.0.0~21 X-Git-Url: https://git.xandkar.net/?a=commitdiff_plain;h=e7b39f0719b5d561181b2ecb49da5b8e6a897076;p=beam_stats.git Fix unknown types. --- diff --git a/include/beam_stats.hrl b/include/beam_stats.hrl index 6b4df10..8b851ed 100644 --- a/include/beam_stats.hrl +++ b/include/beam_stats.hrl @@ -1,7 +1,7 @@ -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()}] diff --git a/src/beam_stats_consumer_graphite.erl b/src/beam_stats_consumer_graphite.erl index c60c6e8..e471bfa 100644 --- a/src/beam_stats_consumer_graphite.erl +++ b/src/beam_stats_consumer_graphite.erl @@ -28,7 +28,7 @@ -record(state, { connect_options = [] :: [connect_option()] - , sock = none :: hope_option:t(gen_tcp:socket()) + , sock = none :: hope_option:t(Socket :: port()) }). -type state() :: diff --git a/src/beam_stats_consumer_statsd.erl b/src/beam_stats_consumer_statsd.erl index cfd6cbf..fe8299c 100644 --- a/src/beam_stats_consumer_statsd.erl +++ b/src/beam_stats_consumer_statsd.erl @@ -144,12 +144,12 @@ beam_stats_to_bins(#beam_stats 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