aboutsummaryrefslogtreecommitdiffstats
path: root/lib/observer/src/observer_lib.erl
diff options
context:
space:
mode:
authorGabriele Santomaggio <[email protected]>2017-07-07 11:56:59 +0200
committerGabriele Santomaggio <[email protected]>2017-08-11 14:23:27 +0200
commitc08a7d382812ec8873a78b3e8eee2cffabf8e982 (patch)
treeb4c73a3cdccef27142c09ef2fdf29eed620a700e /lib/observer/src/observer_lib.erl
parent3da6adc679825d17ce65e7363af6554e5ee1661a (diff)
downloadotp-c08a7d382812ec8873a78b3e8eee2cffabf8e982.tar.gz
otp-c08a7d382812ec8873a78b3e8eee2cffabf8e982.tar.bz2
otp-c08a7d382812ec8873a78b3e8eee2cffabf8e982.zip
Add System statistics / limit panel
Show the statistics, limits and percentage for atoms, processes,ports and ETS. Backward compatibility with old versions, In case the valuse is missing it shows the string Not available.
Diffstat (limited to 'lib/observer/src/observer_lib.erl')
-rw-r--r--lib/observer/src/observer_lib.erl2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/observer/src/observer_lib.erl b/lib/observer/src/observer_lib.erl
index c7ee294719..8b6036f52a 100644
--- a/lib/observer/src/observer_lib.erl
+++ b/lib/observer/src/observer_lib.erl
@@ -297,6 +297,8 @@ to_str(No) when is_integer(No) ->
integer_to_list(No);
to_str(Float) when is_float(Float) ->
io_lib:format("~.3f", [Float]);
+to_str({trunc, Float}) when is_float(Float) ->
+ float_to_list(Float, [{decimals,0}]);
to_str(Term) ->
io_lib:format("~w", [Term]).