[tor-commits] [metrics-tasks/master] task-6329: Rename 'top' output to 'relays'

karsten at torproject.org karsten at torproject.org
Sun Jul 15 08:17:02 UTC 2012


commit fd3fbf2b3c58ea87d29b0e8b628319d3054f0707
Author: delber <delber at riseup.net>
Date:   Sat Jul 14 12:55:21 2012 +0000

    task-6329: Rename 'top' output to 'relays'
    
    All outputs now only display the top ten by defaults, so let's
    rename the output that list relays, 'relays', as suggested by Karsten.
---
 task-6329/README              |    4 ++--
 task-6329/tor-relays-stats.py |    8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/task-6329/README b/task-6329/README
index 443a3d6..a09e7ab 100644
--- a/task-6329/README
+++ b/task-6329/README
@@ -14,8 +14,8 @@ Where <output> is one of:
    relative percentage of the consensus in each countries
  - as-sets [COUNT] [FLAGS] [COUNTRIES]
    relative percentage of the consensus in each AS sets
- - top [COUNT] [FLAGS] [COUNTRIES]
-   top relays according their place in the whole consensus
+ - relays [COUNT] [FLAGS] [COUNTRIES]
+   list relays ranked by their place in the whole consensus
 
 Examples:
 
diff --git a/task-6329/tor-relays-stats.py b/task-6329/tor-relays-stats.py
index d6b3e86..fd30792 100755
--- a/task-6329/tor-relays-stats.py
+++ b/task-6329/tor-relays-stats.py
@@ -74,7 +74,7 @@ class RelayStats(object):
         for as_set, weight in ranking[:count]:
             print "%3.4f%% %s" % (weight * 100.0 / total_consensus_weight, as_set)
 
-    def output_top(self, count='10', flags='', countries=''):
+    def output_relays(self, count='10', flags='', countries=''):
         count = int(count)
         flags = flags.split()
         relays = self.get_relays(flags, countries)
@@ -88,7 +88,7 @@ class RelayStats(object):
 OUTPUTS = {
   'countries': 'output_countries',
   'as-sets': 'output_as_sets',
-  'top': 'output_top',
+  'relays': 'output_relays',
 }
 
 def usage():
@@ -99,8 +99,8 @@ Where <output> is one of:
    relative percentage of the consensus in each countries
  - as-sets [COUNT] [FLAGS] [COUNTRIES]
    relative percentage of the consensus in each AS sets
- - top [COUNT] [FLAGS] [COUNTRIES]
-   top relays according their place in the whole consensus
+ - relays [COUNT] [FLAGS] [COUNTRIES]
+   list relays ranked by their place in the whole consensus
 
 Examples:
 





More information about the tor-commits mailing list