Commit 9aa1d752 authored by Brendan Gregg's avatar Brendan Gregg Committed by Brenden Blanco

gethostlatency was rounding to full ms

parent 42c00adb
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment