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

[tor-commits] [nyx/master] Change graphed default to bytes



commit d0f8702a25517ae44a09a3e7bd4e768c613cadf9
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date:   Sat Aug 5 09:33:30 2017 -0700

    Change graphed default to bytes
    
    Not the first time we've changed this. Unfortunately regardless of if we go
    with bits or bytes somebody will be confused, but from irc contacts over the
    years it's clear most folks expect measurements to be in bytes. Most other
    tools choose bytes so lets be consistent with them.
---
 nyx/panel/graph.py       |  4 ++--
 nyxrc.sample             |  2 +-
 web/changelog/index.html |  1 +
 web/index.html           | 11 ++++++++++-
 4 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/nyx/panel/graph.py b/nyx/panel/graph.py
index 8271b06..fc1e7cb 100644
--- a/nyx/panel/graph.py
+++ b/nyx/panel/graph.py
@@ -81,7 +81,7 @@ CONFIG = conf.config_dict('nyx', {
   'graph_stat': GraphStat.BANDWIDTH,
   'max_graph_width': 300,  # we need some sort of max size so we know how much graph data to retain
   'show_accounting': True,
-  'show_bytes': False,
+  'show_bits': False,
   'show_connections': True,
 }, conf_handler)
 
@@ -708,4 +708,4 @@ def _size_label(byte_count, decimal = 1):
   or bytes.
   """
 
-  return str_tools.size_label(byte_count, decimal, is_bytes = CONFIG['show_bytes'])
+  return str_tools.size_label(byte_count, decimal, is_bytes = not CONFIG['show_bits'])
diff --git a/nyxrc.sample b/nyxrc.sample
index 508c87f..8b87bca 100644
--- a/nyxrc.sample
+++ b/nyxrc.sample
@@ -8,7 +8,7 @@
 
 data_directory ~/.nyx   # Caching location, can be set to 'disabled'.
 tor_chroot /path        # Chroot jail tor resides within if there is one. (*)
-show_bytes false        # Bandwidth rate as bytes if true, bits otherwise.
+show_bits false         # Bandwidth rate as bits if true, bytes otherwise.
 confirm_quit true       # Confirm before quitting.
 color_interface true    # Uses color in our interface.
 color_override none     # Replaces instances of color with this hue.
diff --git a/web/changelog/index.html b/web/changelog/index.html
index b0ee9b7..e623751 100644
--- a/web/changelog/index.html
+++ b/web/changelog/index.html
@@ -66,6 +66,7 @@
         <li><span class="component">Graph</span>
           <ul>
             <li>Graph prepopulation no longer requires shifting to 15 minute intervals</li>
+            <li>Graphing bandwith as bytes by default, rather than bits</li>
           </ul>
         </li>
 
diff --git a/web/index.html b/web/index.html
index d330554..5c2ab82 100644
--- a/web/index.html
+++ b/web/index.html
@@ -212,13 +212,22 @@
           </div>
         </li>
 
+        <li id="bits_or_bytes">
+          <span>Is bandwidth graphed in bits or bytes?</span>
+          <div class="answer">
+            <p><b>Bytes</b>. Most tools measure in bytes so for consistency we do the same. Unfortunately hosting providers advertise in bits to inflate their numbers ("5 Mbit connection"). If graphs show just one eighth of what you expect this is why.</p>
+            <p>To graph in bits rather than bytes add the following to your nyxrc...</p>
+            <pre>show_bits true</pre>
+          </div>
+        </li>
+
         <li id="broken_borders">
           <span>Why are there borders like 'mwqqqqqqqqj'?</span>
           <div class="answer">
             <a class="acs-img" href="images/screenshots/acs_failure.png"><img src="images/faq/acs_failure.png" alt="acs display failure"></a>
             <p>When alternate character support (ACS) <a href="http://invisible-island.net/ncurses/ncurses.faq.html#no_line_drawing";>is unavailable</a> borders become characters like the picture above. This is a terminal bug.</p>
             <p>Unfortunately there doesn't seem to be a way for Nyx to automatically detect this. However, when it happens this <b>can</b> be easily corrected. Simply run <i>reset</i>. To tell Nyx not to use ACS borders simply add the following to your nyxrc...</p>
-            <pre>features.acsSupport false</pre>
+            <pre>acs_support false</pre>
           </div>
         </li>
 



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