Files
podman/hack/perf/start.sh
Valentin Rothberg 4ed46c9847 add hack/perf for comparing two container engines
Add a set of scripts using hyperfine for comparing two container
engines.  I am currently using the scripts for comparing Podman
and Docker, and with older versions of Podman.

These scripts are not meant for production usage but to aid in tracking
down performance regressions and bottlenecks.

Run the scripts via `sudo sh $script.sh`.

Use the following environment variables to change the default behavior:
* `ENGINE_A` to set container engine A (default `/usr/bin/podman`)
* `ENGINE_B` to set container engine B (default `/usr/bin/docker`)
* `RUNS` to change the runs/repetitions of each benchmarks (default `100`)
* `NUM_CONTAINERS` to change the number of created containers for some benchmarks (e.g., `ps`) (default `100`)
* `IMAGE` to change the default container image (default `docker.io/library/alpine:latest`)

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-01-23 16:38:12 +01:00

11 lines
344 B
Bash
Executable File

#!/usr/bin/env sh
source ./helpers.bash
setup
echo_bold "Start $RUNS containers in a row"
hyperfine --warmup 10 --runs $RUNS \
--prepare "$ENGINE_A rm -f 123 || true; $ENGINE_A create --name=123 $IMAGE true" \
--prepare "$ENGINE_B rm -f 123 || true; $ENGINE_B create --name=123 $IMAGE true" \
"$ENGINE_A start 123" \
"$ENGINE_B start 123"