X-Git-Url: https://git.xandkar.net/?a=blobdiff_plain;f=src%2Fbeam_stats_consumer_graphite.erl;h=c2847f0a30b10176e68823d6fdec9ff7dab11ac7;hb=881e328f9d9227e84e8833556ddf1b715efbda7c;hp=c60c6e8a725c14d7d1d0ba510905e61d696e1b66;hpb=caf75ed8160362773766c6bde005cf5f33544392;p=beam_stats.git diff --git a/src/beam_stats_consumer_graphite.erl b/src/beam_stats_consumer_graphite.erl index c60c6e8..c2847f0 100644 --- a/src/beam_stats_consumer_graphite.erl +++ b/src/beam_stats_consumer_graphite.erl @@ -23,12 +23,12 @@ -type option() :: {connect_options , [connect_option()]} - | {consumption_interval , erlang:time()} + | {consumption_interval , non_neg_integer()} . -record(state, { connect_options = [] :: [connect_option()] - , sock = none :: hope_option:t(gen_tcp:socket()) + , sock = none :: hope_option:t(Socket :: port()) }). -type state() :: @@ -37,7 +37,7 @@ -define(GRAPHITE_PATH_PREFIX, "beam_stats"). -spec init([option()]) -> - {erlang:time(), state()}. + {non_neg_integer(), state()}. init(Options) -> ConnectOptions = hope_kv_list:get(Options, connect_options , []), ConsumptionInterval = hope_kv_list:get(Options, consumption_interval, 60000),