diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2011-09-21 16:19:23 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2011-09-21 16:19:23 -0400 |
commit | 4d35b37c1f906265221363e6ba6b879cad9ab32b (patch) | |
tree | 7a92cd39b585079c6c7e256c667e206efc2f48b8 /gpsprof | |
parent | 02a8d5b006544a57a96e8282cdff7091ad596007 (diff) | |
download | gpsd-4d35b37c1f906265221363e6ba6b879cad9ab32b.tar.gz |
Add decode time to the profiling.
Diffstat (limited to 'gpsprof')
-rwxr-xr-x | gpsprof | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -193,6 +193,7 @@ class rawplot: if 'xmit_time' in session.data: self.stats.append((session.data['tag'], gps.misc.isotime(session.data['time']), + session.data['cycle_start'], session.data['xmit_time'], time.time())) return True @@ -204,8 +205,8 @@ class rawplot: return res + "\n" def data(self, unused): res = "" - for (tag, time, xmit, recv) in self.stats: - res += "% 8s %2.9f %2.9f %2.9f\n" % (tag, time, xmit-time, recv-xmit) + 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) return res def plot(self, unused, session, device): fmt = ''' @@ -213,14 +214,15 @@ set autoscale set key below set key title "Raw latency data, %s, %s, %dN%d, cycle %ds" plot \ - "-" using 0:4 title "Reception delta" with impulses, \ - "-" using 0:3 title "Transmission delta" with impulses + "-" using 0:5 title "Reception delta" with impulses, \ + "-" using 0:4 title "Transmission delta" with impulses, \ + "-" using 0:3 title "Decode time" with impulses ''' res = fmt % (title, device['driver'], device['bps'], device['stopbits'], device['cycle']) res += self.header(session, device) - res += (self.data(session) + "e\n") * 2 + res += (self.data(session) + "e\n") * 3 return res formatters = (spaceplot, uninstrumented, rawplot) |