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.

(cherry picked from commit da4aa6905c5524a30709eb4cdf25e22fc63eb86e)
[cf: ctx adjustment]]
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 2d0bff4f0a10f017786345edc9b42b7a6ffacb34)
[wt: ctx adjustment: no start_time in 2.6]
Signed-off-by: Willy Tarreau <w@1wt.eu>
(cherry picked from commit a2e5d62d58d44be3a7fc4cfc355c8ed9a11bf815)
[wt: moved patches to time.{c,h}; s/clock_update_date/tv_update_date]
Signed-off-by: Willy Tarreau <w@1wt.eu>
4 files changed