home
/
code
/
beam_stats.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
feat: implement beam_stats_msg_graphite:to_bin/1
[beam_stats.git]
/
src
/
beam_stats_state.erl
diff --git
a/src/beam_stats_state.erl
b/src/beam_stats_state.erl
index
7c41fc0
..
d514f95
100644
(file)
--- a/
src/beam_stats_state.erl
+++ b/
src/beam_stats_state.erl
@@
-1,6
+1,8
@@
-module(beam_stats_state).
-include("include/beam_stats.hrl").
-module(beam_stats_state).
-include("include/beam_stats.hrl").
+-include("include/beam_stats_process.hrl").
+-include("include/beam_stats_processes.hrl").
-export_type(
[ t/0
-export_type(
[ t/0
@@
-14,6
+16,7
@@
-record(snapshots,
{ memory :: [{atom(), non_neg_integer()}]
-record(snapshots,
{ memory :: [{atom(), non_neg_integer()}]
+ , processes :: beam_stats_processes:t()
, run_queue :: non_neg_integer()
, ets :: beam_stats_ets:t()
}).
, run_queue :: non_neg_integer()
, ets :: beam_stats_ets:t()
}).
@@
-61,8
+64,8
@@
new() ->
t().
new(#totals{}=TotalsPrevious) ->
?T
t().
new(#totals{}=TotalsPrevious) ->
?T
- { timestamp =
os:
timestamp()
- , node_id =
erlang:
node()
+ { timestamp =
beam_stats_source:os_
timestamp()
+ , node_id =
beam_stats_source:erlang_
node()
, snapshots = snapshots_new()
, deltas = deltas_new()
, totals_previous = TotalsPrevious
, snapshots = snapshots_new()
, deltas = deltas_new()
, totals_previous = TotalsPrevious
@@
-83,6
+86,7
@@
export(
, snapshots =
#snapshots
{ memory = Memory
, snapshots =
#snapshots
{ memory = Memory
+ , processes = Processes
, run_queue = RunQueue
, ets = ETS
}
, run_queue = RunQueue
, ets = ETS
}
@@
-114,17
+118,19
@@
export(
, reductions = Reductions
, run_queue = RunQueue
, ets = ETS
, reductions = Reductions
, run_queue = RunQueue
, ets = ETS
+ , processes = Processes
}.
snapshots_new() ->
#snapshots
}.
snapshots_new() ->
#snapshots
- { memory = erlang:memory()
- , run_queue = erlang:statistics(run_queue)
+ { memory = beam_stats_source:erlang_memory()
+ , processes = beam_stats_processes:collect()
+ , run_queue = beam_stats_source:erlang_statistics(run_queue)
, ets = beam_stats_ets:collect()
}.
deltas_new() ->
, ets = beam_stats_ets:collect()
}.
deltas_new() ->
- {_ReductionsTotal, ReductionsDelta} =
erlang:
statistics(reductions),
+ {_ReductionsTotal, ReductionsDelta} =
beam_stats_source:erlang_
statistics(reductions),
#deltas
{ reductions = ReductionsDelta
}.
#deltas
{ reductions = ReductionsDelta
}.
@@
-132,8
+138,8
@@
deltas_new() ->
totals_new() ->
{ {input , IOBytesIn}
, {output , IOBytesOut}
totals_new() ->
{ {input , IOBytesIn}
, {output , IOBytesOut}
- } =
erlang:
statistics(io),
- {ContextSwitches, 0} =
erlang:
statistics(context_switches),
+ } =
beam_stats_source:erlang_
statistics(io),
+ {ContextSwitches, 0} =
beam_stats_source:erlang_
statistics(context_switches),
#totals
{ io_bytes_in = IOBytesIn
, io_bytes_out = IOBytesOut
#totals
{ io_bytes_in = IOBytesIn
, io_bytes_out = IOBytesOut
This page took
0.037288 seconds
and
4
git commands to generate.