test-compress-benchmark: limit default runtime to 2 seconds per subtest
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 18 Oct 2015 21:10:51 +0000 (17:10 -0400)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 23 Oct 2015 13:44:16 +0000 (09:44 -0400)
commitc4291c1524ee4e4575c3b0a726ca5507b2ba74f3
tree6ac3b0fa09cc7cdcc40e1fdc10099abcc2899ad2
parent1a2a0ac53bbe724caf41c2bcf22ab9ea32b63d4e
test-compress-benchmark: limit default runtime to 2 seconds per subtest

If both lz4 and xz are enabled, this results in a limit of
2×3×2 s ~= 12 s runtime.

Previous implementation started with really small buffer sizes. When
combined with a short time limit this resulteded in abysmal results for xz.
It seems that the initialization overead is really significant for small
buffers. Since xz will not be used by default anymore, this does not
seem worth fixing. Instead buffer sizes are changed to run a
pseudo-random non-repeating pattern. This should allow reasonable testing
for all buffer sizes. For testing, both runtime and the buffer size seed
can be specified on the command line. Sufficiently large runtime allows
all buffer sizes up to 1MB to be tested.
src/journal/test-compress-benchmark.c