From 1b0e64a103150d68390f19e67a0d253a97eead9d Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Wed, 23 Aug 2023 14:07:03 +0200 Subject: [PATCH] hack/perf/system-df.sh: add `df` benchmarks The performance issue in #19467 drove me to add a benchmark for system-df to avoid regressing on it in the future. Comparing current HEAD to v4.6.0 yields ``` /home/vrothberg/containers/podman/bin/podman system df ran 201.47 times faster than /usr/bin/podman system df ``` Signed-off-by: Valentin Rothberg --- hack/perf/system-df.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 hack/perf/system-df.sh diff --git a/hack/perf/system-df.sh b/hack/perf/system-df.sh new file mode 100755 index 0000000000..f5f690c06c --- /dev/null +++ b/hack/perf/system-df.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env sh +source ./helpers.bash + +setup +echo_bold "List $NUM_CONTAINERS created containers" +create_containers +hyperfine --warmup 10 --runs $RUNS \ + "$ENGINE_A system df" \ + "$ENGINE_B system df" + +# Clean up +$ENGINE_A system prune -f >> /dev/null +$ENGINE_B system prune -f >> /dev/null