]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: clock: measure the total boot time
authorWilly Tarreau <w@1wt.eu>
Wed, 17 May 2023 07:02:21 +0000 (09:02 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 17 May 2023 07:33:54 +0000 (09:33 +0200)
commitda4aa6905c5524a30709eb4cdf25e22fc63eb86e
treeb94c1afddcf6e2767859bc4dda28ccbdeb52c270
parent52fd87995361d68336b20ec931472bac2cb706ba
MINOR: clock: measure the total boot time

Some huge configs take a significant amount of time to start and this
can cause some trouble (e.g. health checks getting delayed and grouped,
process not responding to the CLI etc). For example, some configs might
start fast in certain environments and slowly in other ones just due to
the use of a wrong DNS server that delays all libc's resolutions. Let's
first start by measuring it by keeping a copy of the most recently known
ready date, once before calling check_config_validity() and then refine
it when leaving this function. A last call is finally performed just
before deciding to split between master and worker processes, and it covers
the whole boot. It's trivial to collect and even allows to get rid of a
call to clock_update_date() in function check_config_validity() that was
used in hope to better schedule future events.
include/haproxy/clock.h
src/cfgparse.c
src/clock.c
src/haproxy.c