Util flushing fix 67/139167/2
authorMichal Bloch <m.bloch@samsung.com>
Wed, 12 Jul 2017 13:55:12 +0000 (15:55 +0200)
committerMichal Bloch <m.bloch@samsung.com>
Thu, 27 Jul 2017 15:22:59 +0000 (17:22 +0200)
commitceceadf75018239ad1f307f84ec010774551a147
tree65b7f42d1a7f6d33cef443c44efea9e0354e0846
parente6c83d873cd86b01a22733b823e41607471a2edf
Util flushing fix

When the sorting buffer is empty, only flush as many logs as needed
to make room for incoming ones. Previously the entire buffer would be
flushed, which was both a performance problem (the program would hang
and not read data while flushing) and a reduction of sort quality (as
recent logs were flushed as well).

Change-Id: I1b10c7286ab28e70438b82d60d69fad6c4f38df3
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
src/logutil/logutil.c