summaryrefslogtreecommitdiff
path: root/gpsprof
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2011-10-06 17:26:15 -0400
committerEric S. Raymond <esr@thyrsus.com>2011-10-06 17:26:15 -0400
commit9826f66b57826ec68eb50dd0684a221a9690e35f (patch)
tree5235a891d9602ab5b0e6e50f59886a1021027b04 /gpsprof
parentca90212a2dc4441e88fba1916949d424f4510dc4 (diff)
downloadgpsd-9826f66b57826ec68eb50dd0684a221a9690e35f.tar.gz
Small improvement in profile logging.
Diffstat (limited to 'gpsprof')
-rwxr-xr-xgpsprof5
1 files changed, 3 insertions, 2 deletions
diff --git a/gpsprof b/gpsprof
index 1851d0b2..bb4620e8 100755
--- a/gpsprof
+++ b/gpsprof
@@ -89,6 +89,9 @@ class plotter:
if "timing" in options and not self.session.data.get("timing"):
sys.stderr.write("timing is not enabled.\n")
sys.exit(1)
+ # Log before filtering - might be good for post-analysis.
+ if logfp:
+ logfp.write(self.session.response)
# Ignore everything but TPVs for the moment
if self.session.data["class"] != "TPV":
continue
@@ -102,8 +105,6 @@ class plotter:
if countdown == await:
sys.stderr.write("first fix in %.2fsec, gathering %d samples..." % (time.time()-basetime,await))
if plotter.sample():
- if logfp:
- logfp.write(self.session.response)
countdown -= 1
baton.end()
finally: