home
/
code
/
beam_stats.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Stop playing...
[beam_stats.git]
/
src
/
beam_stats_consumer_csv.erl
diff --git
a/src/beam_stats_consumer_csv.erl
b/src/beam_stats_consumer_csv.erl
index
c9d2785
..
8380b95
100644
(file)
--- a/
src/beam_stats_consumer_csv.erl
+++ b/
src/beam_stats_consumer_csv.erl
@@
-49,8
+49,7
@@
consume(Q, #state{}=State1) ->
-spec terminate(state()) ->
{}.
terminate(#state{file=FileOpt}) ->
-spec terminate(state()) ->
{}.
terminate(#state{file=FileOpt}) ->
- ok = hope_option:iter(FileOpt, fun file:close/1),
- {}.
+ hope_option:iter(FileOpt, fun file:close/1).
%% ============================================================================
%% ============================================================================
@@
-101,9
+100,9
@@
beam_stats_to_bin(#beam_stats
) ->
<<TimestampBin/binary>> = timestamp_to_bin(Timestamp),
<<NodeIDBin/binary>> = node_id_to_bin(NodeID),
) ->
<<TimestampBin/binary>> = timestamp_to_bin(Timestamp),
<<NodeIDBin/binary>> = node_id_to_bin(NodeID),
-
PairToBin = make_pair_to_bin(NodeIDBin, TimestampBin
),
+
MemoryPairToBin = make_pair_to_bin(NodeIDBin, TimestampBin, <<"memory">>
),
MemoryBinPairs = lists:map(fun atom_int_to_bin_bin/1, Memory),
MemoryBinPairs = lists:map(fun atom_int_to_bin_bin/1, Memory),
- MemoryBins = lists:map(PairToBin, MemoryBinPairs),
+ MemoryBins = lists:map(
Memory
PairToBin, MemoryBinPairs),
AllBins =
[ MemoryBins
],
AllBins =
[ MemoryBins
],
@@
-131,14
+130,16
@@
timestamp_to_float({ComponentMega, ComponentWhole, ComponentMicro}) ->
TotalMicroSeconds = (TotalWholeSeconds * OneMillion) + ComponentMicro,
TotalMicroSeconds / OneMillion.
TotalMicroSeconds = (TotalWholeSeconds * OneMillion) + ComponentMicro,
TotalMicroSeconds / OneMillion.
--spec make_pair_to_bin(binary(), binary()) ->
+-spec make_pair_to_bin(binary(), binary()
, binary()
) ->
fun(({binary(), binary()}) -> binary()).
fun(({binary(), binary()}) -> binary()).
-make_pair_to_bin(<<NodeID/binary>>, <<TimestampBin/binary>>) ->
+make_pair_to_bin(<<NodeID/binary>>, <<TimestampBin/binary>>
, <<Type/binary>>
) ->
fun ({<<K/binary>>, <<V/binary>>}) ->
<< TimestampBin/binary
, "|"
, NodeID/binary
, "|"
fun ({<<K/binary>>, <<V/binary>>}) ->
<< TimestampBin/binary
, "|"
, NodeID/binary
, "|"
+ , Type/binary
+ , "|"
, K/binary
, "|"
, V/binary
, K/binary
, "|"
, V/binary
This page took
0.036273 seconds
and
4
git commands to generate.