diff options
author | Rob Austein <sra@hactrn.net> | 2012-03-15 12:29:42 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2012-03-15 12:29:42 +0000 |
commit | 66025dd6240f3d1ed55eb9aac9c9c2b5ba829ca4 (patch) | |
tree | c4bd63ec98dc1d71ab3ff289522042119e6cbf1b /scripts | |
parent | 53b1ea1ae416245aa69a0ca5e61a69ed7c7d0946 (diff) |
Sigh, make work with Python 2.6 again.
svn path=/trunk/; revision=4399
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/analyze-rcynic-history.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/analyze-rcynic-history.py b/scripts/analyze-rcynic-history.py index 88a55cf9..fdf850cc 100644 --- a/scripts/analyze-rcynic-history.py +++ b/scripts/analyze-rcynic-history.py @@ -85,7 +85,9 @@ class Host(object): @property def seconds_per_object(self): - return float(self.elapsed.total_seconds()) / float(self.object_count) + return float(self.elapsed.days * 24 * 60 * 60 + + self.elapsed.seconds + + self.elapsed.microseconds / 10**6) / float(self.object_count) @property def objects_per_connection(self): @@ -93,7 +95,9 @@ class Host(object): @property def average_connection_time(self): - return float(self.total_connection_time.total_seconds()) / float(self.connection_count) + return float(self.total_connection_time.days * 24 * 60 * 60 + + self.total_connection_time.seconds + + self.total_connection_time.microseconds / 10**6) / float(self.connection_count) class Format(object): |