[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [nyx/master] Fix the nyx cpu usage so now only one decimal digit is showed



commit 922bbcc6367f5b414d42ba0cbd30747ffbbd5c5b
Author: patacca <patacca@xxxxxxxxxxxxx>
Date:   Thu Mar 10 19:47:36 2016 +0100

    Fix the nyx cpu usage so now only one decimal digit is showed
---
 nyx/controller.py   | 4 ++--
 nyx/panel/header.py | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/nyx/controller.py b/nyx/controller.py
index 318df4b..5e4f1b9 100644
--- a/nyx/controller.py
+++ b/nyx/controller.py
@@ -286,8 +286,8 @@ class Controller:
     Redraws the displayed panel content.
 
     Arguments:
-      force - redraws reguardless of if it's needed if true, otherwise ignores
-              the request when there arne't changes to be displayed
+      force - redraws regardless of if it's needed if true, otherwise ignores
+              the request when there aren't changes to be displayed
     """
 
     force |= self._force_redraw
diff --git a/nyx/panel/header.py b/nyx/panel/header.py
index 0d6591a..338ca63 100644
--- a/nyx/panel/header.py
+++ b/nyx/panel/header.py
@@ -472,7 +472,7 @@ def get_sampling(last_sampling = None):
 
     'nyx_total_cpu_time': nyx_total_cpu_time,
     'tor_cpu': '%0.1f' % (100 * tor_resources.cpu_sample),
-    'nyx_cpu': nyx_cpu,
+    'nyx_cpu': '%0.1f' % (nyx_cpu),
     'memory': str_tools.size_label(tor_resources.memory_bytes) if tor_resources.memory_bytes > 0 else 0,
     'memory_percent': '%0.1f' % (100 * tor_resources.memory_percent),
 



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits