summaryrefslogtreecommitdiff
path: root/gpsprof
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2011-09-22 03:47:32 -0400
committerEric S. Raymond <esr@thyrsus.com>2011-09-22 03:47:32 -0400
commit751a4769cbdb2cf7b70b4ab1da6b3ce484673162 (patch)
tree4b19a39945eff3a6d9d3372ce561b5d572854b89 /gpsprof
parent2e125acaf727e8d8e6662e57be4594fcdec7a7da (diff)
downloadgpsd-751a4769cbdb2cf7b70b4ab1da6b3ce484673162.tar.gz
Profiling can isolate RS232 transmission time.
Diffstat (limited to 'gpsprof')
-rwxr-xr-xgpsprof6
1 files changed, 4 insertions, 2 deletions
diff --git a/gpsprof b/gpsprof
index 7903a6c1..52701c9e 100755
--- a/gpsprof
+++ b/gpsprof
@@ -207,12 +207,14 @@ class instrumented:
def data(self, unused, device):
res = ""
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)
+ rs232_time = (chars * 10.0) / device['bps']
+ res += "% 8s %2.9f %u %2.9f %2.9f %2.9f %2.9f\n" % (tag, time, chars, start-time, rs232_time, (xmit-start)-rs232_time, recv-xmit)
return res
def plot(self, unused, session, device):
legends = (
"Fix latency",
- "Transmission delta",
+ "RS232 time",
+ "Analysis time",
"Reception delta",
)
fmt = '''