diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2021-08-06 14:30:16 -0700 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2021-08-09 15:01:29 -0700 |
commit | 34d44262d7c0ba297baadef3b90fc665c309b17c (patch) | |
tree | 89e0c493d4cc90df517548b11a0f5aa425f8f925 /monitor/analyze.c | |
parent | 7dc659cde02ae3aa97609a8edbe9c507b369e710 (diff) | |
download | bluez-34d44262d7c0ba297baadef3b90fc665c309b17c.tar.gz |
monitor: Make --analyze output latencies in msec
Milisecconds is probably the best unit to have since it is unlikely that
the controller can respond in under 1 msec as well as most time
sensitive connection e.g. A2DP, HFP, etc, also don't expect the
latencies to be over 1 sec.
Diffstat (limited to 'monitor/analyze.c')
-rw-r--r-- | monitor/analyze.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/monitor/analyze.c b/monitor/analyze.c index aae153f94..bee05f467 100644 --- a/monitor/analyze.c +++ b/monitor/analyze.c @@ -110,12 +110,15 @@ static void conn_destroy(void *data) printf(" %lu RX packets\n", conn->rx_num); printf(" %lu TX packets\n", conn->tx_num); printf(" %lu TX completed packets\n", conn->tx_num_comp); - printf(" %ld.%06ld seconds min latency\n", - conn->tx_lat_min.tv_sec, conn->tx_lat_min.tv_usec); - printf(" %ld.%06ld seconds max latency\n", - conn->tx_lat_max.tv_sec, conn->tx_lat_max.tv_usec); - printf(" %ld.%06ld seconds median latency\n", - conn->tx_lat_med.tv_sec, conn->tx_lat_med.tv_usec); + printf(" %ld msec min latency\n", + conn->tx_lat_min.tv_sec * 1000 + + conn->tx_lat_min.tv_usec / 1000); + printf(" %ld msec max latency\n", + conn->tx_lat_max.tv_sec * 1000 + + conn->tx_lat_max.tv_usec / 1000); + printf(" %ld msec median latency\n", + conn->tx_lat_med.tv_sec * 1000 + + conn->tx_lat_med.tv_usec / 1000); printf(" %u octets TX min packet size\n", conn->tx_pkt_min); printf(" %u octets TX max packet size\n", conn->tx_pkt_max); printf(" %u octets TX median packet size\n", conn->tx_pkt_med); |