diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2011-09-24 17:15:57 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2011-09-24 17:15:57 -0400 |
commit | a368e48f9b8fb1e27542fb82f2adf656ac432b7f (patch) | |
tree | 07ddc8295a5dceb37bc7f8762b0876b602e85ad8 /gpsprof | |
parent | 5d3130b97bafe2f5441e21859d7ae41dc1ced717 (diff) | |
download | gpsd-a368e48f9b8fb1e27542fb82f2adf656ac432b7f.tar.gz |
Add whole-cycle profiling to show vendor binary orotocols don't cut latency.
Diffstat (limited to 'gpsprof')
-rwxr-xr-x | gpsprof | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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 |