summaryrefslogtreecommitdiff
path: root/src/journal/test-compress-benchmark.c
AgeCommit message (Collapse)Author
2015-10-27util-lib: split out allocation calls into alloc-util.[ch]Lennart Poettering
2015-10-27util-lib: split string parsing related calls from util.[ch] into parse-util.[ch]Lennart Poettering
2015-10-24util-lib: split our string related calls from util.[ch] into its own file ↵Lennart Poettering
string-util.[ch] There are more than enough calls doing string manipulations to deserve its own files, hence do something about it. This patch also sorts the #include blocks of all files that needed to be updated, according to the sorting suggestions from CODING_STYLE. Since pretty much every file needs our string manipulation functions this effectively means that most files have sorted #include blocks now. Also touches a few unrelated include files.
2015-10-23test-compress-benchmark: properly initialize bufferZbigniew Jędrzejewski-Szmek
We were compressing unitialized memory, which should not result in any problems, but is inelegant.
2015-10-23test-compress-benchmark: limit default runtime to 2 seconds per subtestZbigniew Jędrzejewski-Szmek
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.
2015-10-10test-compress-benchmark: test three cases (zeros, simple, semi-random)Zbigniew Jędrzejewski-Szmek
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.
2015-01-22tests: use assert_se instead of assertRonny Chevalier
Otherwise they can be optimized away with -DNDEBUG
2014-08-30Fix a few more typosRuben Kerkhof
2014-08-03Fix misuse of uint64_t as size_tZbigniew Jędrzejewski-Szmek
They have different size on 32 bit, so they are really not interchangable.
2014-07-16test-compress-benchmark: add missing % before PRIu64 formatThomas Hindoe Paaboel Andersen
2014-07-15test-compress-benchmark: silence warningsMarc-Antoine Perennou
and btw make it pass for 32bits where size_t != uint64_t
2014-07-06compress: add benchmark-style testZbigniew Jędrzejewski-Szmek
This is useful to test the behaviour of the compressor for various buffer sizes. Time is limited to a minute per compression, since otherwise, when LZ4 takes more than a second which is necessary to reduce the noise, XZ takes more than 10 minutes. % build/test-compress-benchmark (without time limit) XZ: compressed & decompressed 2535300963 bytes in 794.57s (3.04MiB/s), mean compresion 99.95%, skipped 3570 bytes LZ4: compressed & decompressed 2535303543 bytes in 1.56s (1550.07MiB/s), mean compresion 99.60%, skipped 990 bytes % build/test-compress-benchmark (with time limit) XZ: compressed & decompressed 174321481 bytes in 60.02s (2.77MiB/s), mean compresion 99.76%, skipped 3570 bytes LZ4: compressed & decompressed 2535303543 bytes in 1.63s (1480.83MiB/s), mean compresion 99.60%, skipped 990 bytes It appears that there's a bug in lzma_end where it leaks 32 bytes.