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

[tor-commits] [metrics-tasks/master] Fix a bug in counting guards and exits (#6232).



commit ca0339bd300854853e126e5402d50e4f527739b5
Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date:   Tue Jul 24 09:59:15 2012 +0200

    Fix a bug in counting guards and exits (#6232).
---
 task-6232/pyentropy.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/task-6232/pyentropy.py b/task-6232/pyentropy.py
index 74c5699..76a3d52 100644
--- a/task-6232/pyentropy.py
+++ b/task-6232/pyentropy.py
@@ -117,6 +117,8 @@ def run(file_name):
         if router.is_guard and router.is_exit:
             total_guard_bw += Wgd*router.bandwidth
             total_exit_bw += Wed*router.bandwidth
+            guards_no += 1
+            exits_no += 1
         elif router.is_guard:
             total_guard_bw += Wgg*router.bandwidth
             guards_no += 1



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