0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-12-22 17:51:53 +00:00

IO: Improve resolution of latency debugging messages

This commit is contained in:
Ondrej Zajicek 2022-06-04 17:54:08 +02:00
parent a8a3d95be5
commit f39e9aa203

View File

@ -2046,8 +2046,8 @@ io_update_time(void)
event_open->duration = last_time - event_open->timestamp; event_open->duration = last_time - event_open->timestamp;
if (event_open->duration > config->latency_limit) if (event_open->duration > config->latency_limit)
log(L_WARN "Event 0x%p 0x%p took %d ms", log(L_WARN "Event 0x%p 0x%p took %u.%03u ms",
event_open->hook, event_open->data, (int) (event_open->duration TO_MS)); event_open->hook, event_open->data, (uint) (event_open->duration TO_MS), (uint) (event_open->duration % 1000));
event_open = NULL; event_open = NULL;
} }
@ -2151,8 +2151,8 @@ watchdog_stop(void)
btime duration = last_time - loop_time; btime duration = last_time - loop_time;
if (duration > config->watchdog_warning) if (duration > config->watchdog_warning)
log(L_WARN "I/O loop cycle took %d ms for %d events", log(L_WARN "I/O loop cycle took %u.%03u ms for %d events",
(int) (duration TO_MS), event_log_num); (uint) (duration TO_MS), (uint) (duration % 1000), event_log_num);
} }