mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-17 16:47:50 +00:00
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>
25 lines
600 B
Bash
Executable file
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
|