[tor-commits] [metrics-tasks/master] Change entropy_exit to entropy_guard and vice-versa. Thanks asn!
karsten at torproject.org
karsten at torproject.org
Sat Jul 14 15:31:31 UTC 2012
commit 585553ccffda77970160f01ab926c7f05824ef3f
Author: Sathyanarayanan <gsathya.ceg at gmail.com>
Date: Fri Jul 13 20:09:12 2012 +0530
Change entropy_exit to entropy_guard and vice-versa. Thanks asn!
---
task-6232/pyentropy.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/task-6232/pyentropy.py b/task-6232/pyentropy.py
index 650423b..ec3365f 100644
--- a/task-6232/pyentropy.py
+++ b/task-6232/pyentropy.py
@@ -72,12 +72,12 @@ def run(file_name):
if router.is_guard:
p = float(router.bandwidth) / float(totalGuardBW)
if p != 0:
- entropy_exit += -(p * math.log(p, 2))
+ entropy_guard += -(p * math.log(p, 2))
if router.is_exit:
p = float(router.bandwidth) / float(totalExitBW)
if p != 0:
- entropy_guard += -(p * math.log(p, 2))
+ entropy_exit += -(p * math.log(p, 2))
return ",".join([valid_after, str(entropy), str(entropy_exit), str(entropy_guard)])
More information about the tor-commits
mailing list