]> git.ipfire.org Git - thirdparty/haproxy.git/commit
OPTIM: halog: keep a fast path for the lines-count only
authorWilly Tarreau <w@1wt.eu>
Tue, 3 Jan 2012 08:23:03 +0000 (09:23 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 3 Jan 2012 08:28:05 +0000 (09:28 +0100)
commite1a908c369ab988448c6672066ad1d09b6919d02
tree413099f8f5137c1504b9c3df056453e50f7d60b5
parent7f051b39d2a640063117ce3cf47b329471bef31a
OPTIM: halog: keep a fast path for the lines-count only

Using "halog -c" is still something quite common to perform on logs,
but unfortunately since the recent added controls, it was sensibly
slowed down due to the parsing of the accept date field.

Now we use a specific loop for the case where nothing is needed from
the input, and this sped up the line counting by 2.5x. A 2.4 GHz Xeon
now counts lines at a rate of 2 GB of logs per second.
contrib/halog/halog.c