aboutsummaryrefslogtreecommitdiffstats
path: root/lib/observer/src/observer_perf_wx.erl
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2016-12-05 11:50:36 +0100
committerSiri Hansen <[email protected]>2016-12-05 11:52:16 +0100
commite8e4de181fffe44f6bafa72c45bd79ca5811abd4 (patch)
tree3de6b481514f24caef551a1a14db8420dffd7f72 /lib/observer/src/observer_perf_wx.erl
parent66d9db41091fce5ac3b55517a1283c22ef2292c4 (diff)
downloadotp-e8e4de181fffe44f6bafa72c45bd79ca5811abd4.tar.gz
otp-e8e4de181fffe44f6bafa72c45bd79ca5811abd4.tar.bz2
otp-e8e4de181fffe44f6bafa72c45bd79ca5811abd4.zip
[observer] Fix update of range in memory allocator graphs
Diffstat (limited to 'lib/observer/src/observer_perf_wx.erl')
-rw-r--r--lib/observer/src/observer_perf_wx.erl8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/observer/src/observer_perf_wx.erl b/lib/observer/src/observer_perf_wx.erl
index 6a1aac92c7..b0ead42e3f 100644
--- a/lib/observer/src/observer_perf_wx.erl
+++ b/lib/observer/src/observer_perf_wx.erl
@@ -383,8 +383,8 @@ lmax(MState, Values, State) ->
init_data(runq, {stats, _, T0, _, _}) -> {mk_max(),lists:sort(T0)};
init_data(io, {stats, _, _, {{_,In0}, {_,Out0}}, _}) -> {mk_max(), {In0,Out0}};
init_data(memory, _) -> {mk_max(), info(memory, undefined)};
-init_data(alloc, _) -> {mk_max(), ok};
-init_data(utilz, _) -> {mk_max(), ok}.
+init_data(alloc, _) -> {mk_max(), unused};
+init_data(utilz, _) -> {mk_max(), unused}.
info(runq, {stats, _, T0, _, _}) -> lists:seq(1, length(T0));
info(memory, _) -> [total, processes, atom, binary, code, ets];
@@ -410,11 +410,11 @@ collect_data(memory, {stats, _, _, _, MemInfo}, {Max, MemTypes}) ->
collect_data(alloc, MemInfo, Max) ->
Vs = [Carrier || {_Type,_Block,Carrier} <- MemInfo],
Sample = list_to_tuple(Vs),
- {Sample, lmax(Max, Vs, Sample)};
+ {Sample, {lmax(Max, Vs, Sample),unused}};
collect_data(utilz, MemInfo, Max) ->
Vs = [round(100*Block/Carrier) || {_Type,Block,Carrier} <- MemInfo],
Sample = list_to_tuple(Vs),
- {Sample, lmax(Max,Vs,Sample)}.
+ {Sample, {lmax(Max,Vs,Sample),unused}}.
calc_delta([{Id, WN, TN}|Ss], [{Id, WP, TP}|Ps]) ->
[100*(WN-WP) div (TN-TP)|calc_delta(Ss, Ps)];