projects
/
platform
/
upstream
/
bcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
42c00ad
)
gethostlatency was rounding to full ms
author
Brendan Gregg
<brendan.d.gregg@gmail.com>
Thu, 22 Jun 2017 18:58:21 +0000
(11:58 -0700)
committer
Brenden Blanco
<bblanco@gmail.com>
Thu, 22 Jun 2017 20:01:00 +0000
(13:01 -0700)
tools/gethostlatency.py
patch
|
blob
|
history
diff --git
a/tools/gethostlatency.py
b/tools/gethostlatency.py
index
4eb445c
..
77a8b81
100755
(executable)
--- a/
tools/gethostlatency.py
+++ b/
tools/gethostlatency.py
@@
-123,7
+123,8
@@
print("%-9s %-6s %-16s %10s %s" % ("TIME", "PID", "COMM", "LATms", "HOST"))
def print_event(cpu, data, size):
event = ct.cast(data, ct.POINTER(Data)).contents
print("%-9s %-6d %-16s %10.2f %s" % (strftime("%H:%M:%S"), event.pid,
- event.comm.decode(), (event.delta / 1000000), event.host.decode()))
+ event.comm.decode(), (float(event.delta) / 1000000),
+ event.host.decode()))
# loop with callback to print_event
b["events"].open_perf_buffer(print_event)