]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/libsystemd/sd-event/sd-event.c
sd-event: instrument sd_event_run() for profiling delays 2147/head
authorVito Caputo <vcaputo@gnugeneration.com>
Mon, 7 Dec 2015 19:28:18 +0000 (11:28 -0800)
committerVito Caputo <vito.caputo@coreos.com>
Tue, 12 Jan 2016 17:35:17 +0000 (09:35 -0800)
commit34b87517749caa4142b19eb3c63bdf349fafbc49
tree93a48cb549713e7acdf4c63590b9891f59eb0f78
parentcf6c8c46fceac83dfb3f2d55fae5220e60841553
sd-event: instrument sd_event_run() for profiling delays

Set SD_EVENT_PROFILE_DELAYS to activate accounting and periodic logging
of the distribution of delays between sd_event_run() calls.

Time spent in dispatching as well as time spent outside of
sd_event_run() is measured and accounted for.  Every 5 seconds a
logarithmic histogram loop iteration delays since 5 seconds previous is
logged.

This is useful in identifying the frequency and magnitude of latencies
affecting the event loop, which should be kept to a minimum.
src/libsystemd/sd-event/sd-event.c