[tor-commits] [metrics-tasks/master] Fix a bug in counting guards and exits (#6232).
karsten at torproject.org
karsten at torproject.org
Tue Jul 24 10:11:21 UTC 2012
commit ca0339bd300854853e126e5402d50e4f527739b5
Author: Karsten Loesing <karsten.loesing at gmx.net>
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
More information about the tor-commits
mailing list