criu/test/others/compression/benchmark/run.sh
Radostin Stoyanov 56aecf2594 test/others: Run compression benchmark in CI
The benchmark and its five data generators otherwise remain standalone
tooling, so normal CI would not notice broken integrity checks,
statistics accounting, or compression configuration.

Add a bounded smoke run for zero, mixed, pseudorandom, text, and
ELF-derived mappings. Compare uncompressed, per-page LZ4, and 64 KiB
region images with one warmup and one measured iteration, print the
results, and fail on checksum, accounting, or configuration errors.

Run the helper tests first, then build the pycriu bindings needed by the
live benchmark. Leave the host page cache untouched and enforce a
five-minute timeout. Gate the run on compression support.

Assisted-by: Codex:GPT-5
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2026-07-14 10:17:01 +01:00

25 lines
600 B
Bash
Executable file

#!/bin/sh
set -eu
root=$(cd -- "$(dirname -- "$0")/../../../.." && pwd)
if [ "$(id -u)" -ne 0 ]; then
echo "compression/benchmark: must run as root" >&2
exit 1
fi
# main.py reads CRIU's generated statistics protobufs through pycriu.
make -C "$root" lib
timeout --foreground --kill-after=30s 300s \
python3 "$root/contrib/compression-benchmark/main.py" \
--criu "$root/criu/criu" \
--iterations 1 \
--size 256 \
--data-pattern zero mixed random text elf \
--modes uncompressed lz4-page lz4-region \
--region-sizes 65536 \
--decompress-threads 4 \
--no-drop-caches \
--no-progress-bar