diff options
author | Siri Hansen <[email protected]> | 2016-12-12 16:34:32 +0100 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2016-12-12 16:34:32 +0100 |
commit | 40e5a09362042adfccc5964bde48a2dce27373fd (patch) | |
tree | 349f52daef265910e884d698f1d258e0458d795b /lib/observer/src/observer_pro_wx.erl | |
parent | b47d104994c6f11301f23b0675ed5f06f3e25922 (diff) | |
download | otp-40e5a09362042adfccc5964bde48a2dce27373fd.tar.gz otp-40e5a09362042adfccc5964bde48a2dce27373fd.tar.bz2 otp-40e5a09362042adfccc5964bde48a2dce27373fd.zip |
[etop] Show CPU utilization for last interval only
Since commit 265998a7e412cd382315632964846569c370a5a2, etop reports
the CPU (scheduler) utilization since the tool was started instead of
for the last interval only. This is now corrected.
Diffstat (limited to 'lib/observer/src/observer_pro_wx.erl')
-rw-r--r-- | lib/observer/src/observer_pro_wx.erl | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/observer/src/observer_pro_wx.erl b/lib/observer/src/observer_pro_wx.erl index ee6829b847..f07b9e295a 100644 --- a/lib/observer/src/observer_pro_wx.erl +++ b/lib/observer/src/observer_pro_wx.erl @@ -511,7 +511,13 @@ table_holder(#holder{info=Info, attrs=Attrs, table_holder(S0); {dump, Fd} -> EtopInfo = (S0#holder.etop)#etop_info{procinfo=array:to_list(Info)}, - etop_txt:do_update(Fd, EtopInfo, #opts{node=Node}), + %% The empty #etop_info{} below is a dummy previous info + %% value. It is used by etop to calculate the scheduler + %% utilization since last update. When dumping to file, + %% there is no previous measurement to use, so we just add + %% a dummy here, and the value shown will be since the + %% tool was started. + etop_txt:do_update(Fd, EtopInfo, #etop_info{}, #opts{node=Node}), file:close(Fd), table_holder(S0); stop -> |