aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2011-10-26 01:07:54 +0000
committerRob Austein <sra@hactrn.net>2011-10-26 01:07:54 +0000
commitb603eff69488017e1b3532a9bfed61176fa6fdc6 (patch)
treed740609efc1603bd95ef8644bf4aac9d4c3453b3 /scripts
parentdaa67c484a6597cd01d80aea198bdabb5a5f38f7 (diff)
Tweak time format. Fix accidental dependency on Python 2.7.
svn path=/trunk/; revision=4063
Diffstat (limited to 'scripts')
-rw-r--r--scripts/analyze-rcynic-history.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/scripts/analyze-rcynic-history.py b/scripts/analyze-rcynic-history.py
index dbc00ea3..c4182db7 100644
--- a/scripts/analyze-rcynic-history.py
+++ b/scripts/analyze-rcynic-history.py
@@ -93,11 +93,14 @@ class Host(object):
@property
def seconds_per_object(self):
- return self.elapsed.total_seconds() / float(self.object_count * self.session_count)
+ return (float((self.elapsed.days * 24 * 3600 + self.elapsed.seconds) * 10**6 +
+ self.elapsed.microseconds) /
+ float(self.object_count * self.session_count * 10**6))
@property
def objects_per_connection(self):
- return float(self.object_count * self.session_count) / float(self.connection_count)
+ return (float(self.object_count * self.session_count) /
+ float(self.connection_count))
@property
def scaled_connections(self):
@@ -230,7 +233,9 @@ def plotter(f, hostnames, field, logscale = False):
#set format x '%H:%M:%S'
#set format x '%m-%d'
#set format x '%a%H'
- set format x '%H:%M'
+ #set format x '%H:%M'
+ #set format x '%a%H:%M'
+ set format x "%a\\n%H:%M"
set title '""" + title + """'
plot""" + ",".join(" '-' using 1:2 with lines title '%s'" % h for h in hostnames) + "\n")
for i in xrange(1, n):