]> git.ipfire.org Git - thirdparty/haproxy.git/commit
REORG: time/activity: move activity measurements to activity.{c,h}
authorWilly Tarreau <w@1wt.eu>
Thu, 22 Nov 2018 07:31:09 +0000 (08:31 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 22 Nov 2018 10:48:41 +0000 (11:48 +0100)
commit609aad9e737f9ac9da7fc04167414ff1ec998f01
tree2f3d50fca4ab5a576534f376a3a4e98799ef7aa3
parent17306b905ea51a81a856d829242cce6052e06596
REORG: time/activity: move activity measurements to activity.{c,h}

At the moment the situation with activity measurement is quite tricky
because the struct activity is defined in global.h and declared in
haproxy.c, with operations made in time.h and relying on freq_ctr
which are defined in freq_ctr.h which itself includes time.h. It's
barely possible to touch any of these files without breaking all the
circular dependency.

Let's move all this stuff to activity.{c,h} and be done with it. The
measurement of active and stolen time is now done in a dedicated
function called just after tv_before_poll() instead of mixing the two,
which used to be a lazy (but convenient) decision.

No code was changed, stuff was just moved around.
15 files changed:
Makefile
include/common/time.h
include/proto/activity.h [new file with mode: 0644]
include/proto/fd.h
include/types/activity.h [new file with mode: 0644]
include/types/global.h
src/activity.c [new file with mode: 0644]
src/cli.c
src/ev_epoll.c
src/ev_kqueue.c
src/ev_poll.c
src/ev_select.c
src/haproxy.c
src/stream.c
src/time.c