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

[tor-commits] [arm/master] Dropping graph stat's get_refresh_rate()



commit d0c123071ecffa8904a9289b3191d5d9bd1345fb
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date:   Tue Sep 16 09:30:58 2014 -0700

    Dropping graph stat's get_refresh_rate()
    
    Honestly not quite sure what this method is for. Stats provide a metric every
    second, and the panel shows results at various intervals. But this method
    simply prevented the connection stats from being redrawn more frequently...?
---
 arm/graphing/conn_stats.py  |    3 ---
 arm/graphing/graph_panel.py |   10 +---------
 2 files changed, 1 insertion(+), 12 deletions(-)

diff --git a/arm/graphing/conn_stats.py b/arm/graphing/conn_stats.py
index b81752b..a69fc33 100644
--- a/arm/graphing/conn_stats.py
+++ b/arm/graphing/conn_stats.py
@@ -60,6 +60,3 @@ class ConnStats(graph_panel.GraphStats):
       return 'Inbound (%s, avg: %s):' % (self.last_primary, avg)
     else:
       return 'Outbound (%s, avg: %s):' % (self.last_secondary, avg)
-
-  def get_refresh_rate(self):
-    return 5
diff --git a/arm/graphing/graph_panel.py b/arm/graphing/graph_panel.py
index 76f32b7..5bf61d1 100644
--- a/arm/graphing/graph_panel.py
+++ b/arm/graphing/graph_panel.py
@@ -163,7 +163,7 @@ class GraphStats:
     if self._graph_panel and self.is_selected and not self._graph_panel.is_paused():
       # use the minimum of the current refresh rate and the panel's
       update_rate = UPDATE_INTERVALS[self._graph_panel.update_interval][1]
-      return (self.tick + 1) % min(update_rate, self.get_refresh_rate()) == 0
+      return (self.tick + 1) % update_rate == 0
     else:
       return False
 
@@ -195,14 +195,6 @@ class GraphStats:
 
     return DEFAULT_CONTENT_HEIGHT
 
-  def get_refresh_rate(self):
-    """
-    Provides the number of ticks between when the stats have new values to be
-    redrawn.
-    """
-
-    return 1
-
   def is_visible(self):
     """
     True if the stat has content to present, false if it should be hidden.



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