From: Brendan Gregg Date: Thu, 22 Jun 2017 18:58:21 +0000 (-0700) Subject: gethostlatency was rounding to full ms X-Git-Tag: submit/tizen_4.0/20171018.110122~78 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9aa1d75212d5a9c64751072e3aecf55b206869b7;p=platform%2Fupstream%2Fbcc.git gethostlatency was rounding to full ms --- diff --git a/tools/gethostlatency.py b/tools/gethostlatency.py index 4eb445c7..77a8b81d 100755 --- 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)