X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=apt_p2p%2Fstats.py;h=7cea6b2e1f707d74e3ca871946c4e39eb869191a;hb=ca85dd289ae87b85f0841463284dacff95420bd7;hp=06e291bd154a21b4e797713b3082b4829821262f;hpb=a9f0deccc4673d5332622ce40407ff009af6c8a3;p=quix0rs-apt-p2p.git
diff --git a/apt_p2p/stats.py b/apt_p2p/stats.py
index 06e291b..7cea6b2 100644
--- a/apt_p2p/stats.py
+++ b/apt_p2p/stats.py
@@ -34,8 +34,8 @@ class StatsLogger:
def __init__(self, db):
"""Initialize the statistics.
- @type store: L{db.DB}
- @param store: the database for the Apt-P2P downloader
+ @type db: L{db.DB}
+ @param db: the database for the Apt-P2P downloader
"""
# Database
self.db = db
@@ -77,7 +77,7 @@ class StatsLogger:
# General
out.write("
\n")
out.write("General | Value |
\n")
- out.write("Contact | " + str(uncompact(contactAddress)) + ' |
\n')
+ out.write("Contact | " + str(contactAddress) + ' |
\n')
out.write("
\n")
out.write('\n')
@@ -95,24 +95,24 @@ class StatsLogger:
out.write(" | This Session | ")
out.write("" + byte_format(self.mirrorDown) + ' | ')
out.write("" + byte_format(self.peerDown) + ' | ')
- out.write("" + byte_format(self.peerUp) + ' |
')
+ out.write("" + byte_format(self.peerUp) + ' | \n')
out.write("Session Ratio | ")
out.write("%0.2f%% | " %
(100.0 * float(self.mirrorDown) / float(max(self.mirrorDown + self.peerDown, 1)), ))
out.write("%0.2f%% | " %
(100.0 * float(self.peerDown) / float(max(self.mirrorDown + self.peerDown, 1)), ))
- out.write("%0.2f%% |
" %
+ out.write("%0.2f%% | \n" %
(100.0 * float(self.peerUp) / float(max(self.mirrorDown + self.peerDown, 1)), ))
out.write("All-Time | ")
out.write("" + byte_format(self.mirrorAllDown) + ' | ')
out.write("" + byte_format(self.peerAllDown) + ' | ')
- out.write("" + byte_format(self.peerAllUp) + ' |
')
+ out.write("" + byte_format(self.peerAllUp) + ' | \n')
out.write("All-Time Ratio | ")
out.write("%0.2f%% | " %
(100.0 * float(self.mirrorAllDown) / float(max(self.mirrorAllDown + self.peerAllDown, 1)), ))
out.write("%0.2f%% | " %
(100.0 * float(self.peerAllDown) / float(max(self.mirrorAllDown + self.peerAllDown, 1)), ))
- out.write("%0.2f%% |
" %
+ out.write("%0.2f%% | " %
(100.0 * float(self.peerAllUp) / float(max(self.mirrorAllDown + self.peerAllDown, 1)), ))
out.write("\n")
out.write("\n")