From: Siraaj Khandkar Date: Wed, 23 Sep 2015 13:54:52 +0000 (-0400) Subject: refactor: re-use graphite_msg cons/3 X-Git-Tag: 0.10.0^2~9 X-Git-Url: https://git.xandkar.net/?a=commitdiff_plain;h=d07a494beb262bbae36ec2f65b496bcee3963a38;p=beam_stats.git refactor: re-use graphite_msg cons/3 --- diff --git a/src/beam_stats_msg_graphite.erl b/src/beam_stats_msg_graphite.erl index 8c13d60..b423e63 100644 --- a/src/beam_stats_msg_graphite.erl +++ b/src/beam_stats_msg_graphite.erl @@ -56,11 +56,7 @@ of_memory(Memory, <>, Timestamp) -> ComponentToMessage = fun ({Key, Value}) -> KeyBin = atom_to_binary(Key, latin1), - ?T - { path = [NodeID, <<"memory">>, KeyBin] - , value = Value - , timestamp = Timestamp - } + cons([NodeID, <<"memory">>, KeyBin], Value, Timestamp) end, lists:map(ComponentToMessage, Memory).