summaryrefslogtreecommitdiff
path: root/gpsprof
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2011-09-24 17:15:57 -0400
committerEric S. Raymond <esr@thyrsus.com>2011-09-24 17:15:57 -0400
commita368e48f9b8fb1e27542fb82f2adf656ac432b7f (patch)
tree07ddc8295a5dceb37bc7f8762b0876b602e85ad8 /gpsprof
parent5d3130b97bafe2f5441e21859d7ae41dc1ced717 (diff)
downloadgpsd-a368e48f9b8fb1e27542fb82f2adf656ac432b7f.tar.gz
Add whole-cycle profiling to show vendor binary orotocols don't cut latency.
Diffstat (limited to 'gpsprof')
-rwxr-xr-xgpsprof8
1 files changed, 4 insertions, 4 deletions
diff --git a/gpsprof b/gpsprof
index 981fc566..ce3d85cb 100755
--- a/gpsprof
+++ b/gpsprof
@@ -335,15 +335,15 @@ if __name__ == '__main__':
plotter.collect(verbose)
# Save the raw data for post-analysis if required.
if dumpfile:
- with open(dumpfile) as fp:
+ with open(dumpfile, "w") as fp:
fp.write(plotter.dump())
# Ship the plot to standard output
+ if not title:
+ title = plotter.whatami()
if terminal:
sys.stdout.write("set terminal %s\n" % terminal)
+ sys.stdout.write("set title \"%s\"\n" % title)
sys.stdout.write(plotter.plot())
- if not title:
- title = plotter.whatami()
- sys.stdout.write("set title %s\n" % title)
except KeyboardInterrupt:
pass