test-compress-benchmark: test three cases (zeros, simple, semi-random)
Existing test would use highly-compressible repeatable
input. Two types of input are added:
- zeros
- random blocks interspersed with zeros
The idea is to get more information about behaviour in various cases.
On Intel Xeon the results are:
% ./test-compress-benchmark
XZ/zeros: compressed & decompressed
2535301373 bytes in 32.56s (74.26MiB/s), mean compresion 99.96%, skipped 3160 bytes
LZ4/zeros: compressed & decompressed
2535304362 bytes in 1.16s (2088.69MiB/s), mean compresion 99.60%, skipped 171 bytes
XZ/simple: compressed & decompressed
2535300963 bytes in 30.42s (79.48MiB/s), mean compresion 99.95%, skipped 3570 bytes
LZ4/simple: compressed & decompressed
2535303543 bytes in 1.22s (1978.86MiB/s), mean compresion 99.60%, skipped 990 bytes
XZ/random: compressed & decompressed
381756649 bytes in 60.02s (6.07MiB/s), mean compresion 39.64%, skipped
27813723 bytes
LZ4/random: compressed & decompressed
2507385036 bytes in 0.97s (2477.52MiB/s), mean compresion 54.77%, skipped
27919497 bytes
If someone has ideas for more realistic test cases, they can be easily
added to this framework.