summaryrefslogtreecommitdiff
path: root/gpsprof
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2011-09-22 01:32:07 -0400
committerEric S. Raymond <esr@thyrsus.com>2011-09-22 01:32:07 -0400
commit8bc89f362ad7ce69f0960ebab60be52f3c53b5db (patch)
treec58740642200ee222bd6091858f0d0aef9c46b3e /gpsprof
parent631d6e6eddfe566b801e4440e5254cc4f80bab8d (diff)
downloadgpsd-8bc89f362ad7ce69f0960ebab60be52f3c53b5db.tar.gz
Prfile numbers now include a per-cycle chracter count.
Diffstat (limited to 'gpsprof')
-rwxr-xr-xgpsprof7
1 files changed, 4 insertions, 3 deletions
diff --git a/gpsprof b/gpsprof
index 82e98f67..77374afa 100755
--- a/gpsprof
+++ b/gpsprof
@@ -193,6 +193,7 @@ class instrumented:
if 'xmit_time' in session.data:
self.stats.append((session.data['tag'],
gps.misc.isotime(session.data['time']),
+ session.data["cycle_count"],
session.data['cycle_start'],
session.data['xmit_time'],
time.time()))
@@ -205,8 +206,8 @@ class instrumented:
return res + "\n"
def data(self, unused):
res = ""
- for (tag, time, start, xmit, recv) in self.stats:
- res += "% 8s %2.9f %2.9f %2.9f %2.9f\n" % (tag, time, start-time, xmit-start, recv-xmit)
+ for (tag, time, chars, start, xmit, recv) in self.stats:
+ res += "% 8s %2.9f %u %2.9f %2.9f %2.9f\n" % (tag, time, chars, start-time, xmit-start, recv-xmit)
return res
def plot(self, unused, session, device):
legends = (
@@ -220,7 +221,7 @@ set key below
set key title "Raw latency data, %s, %s, %dN%d, cycle %ds"
plot \\\n'''
for (i, legend) in enumerate(legends):
- fmt += ' "-" using 0:%d title "%s" with impulses, \\\n' % (i+3, legend)
+ fmt += ' "-" using 0:%d title "%s" with impulses, \\\n' % (i+4, legend)
fmt = fmt[:-4] + "\n"
res = fmt % (title,
device['driver'], device['bps'],