1
0
mirror of https://github.com/containers/youki synced 2024-11-26 14:13:49 +01:00

Add a hack-benchmark recipe

We often use this to quickly get a sense of perf of a PR change.

Signed-off-by: yihuaf <yihuaf@unkies.org>
This commit is contained in:
yihuaf 2023-07-31 08:14:44 -07:00
parent 3151278420
commit a67d180dc0

@ -99,6 +99,17 @@ clean-test-kind:
hack-bpftrace:
BPFTRACE_STRLEN=120 ./hack/debug.bt
# a hacky benchmark method we have been using casually to compare performance
hack-benchmark:
#!/usr/bin/env bash
set -euo pipefail
hyperfine \
--prepare 'sudo sync; echo 3 | sudo tee /proc/sys/vm/drop_caches' \
--warmup 10 \
--min-runs 100 \
'sudo {{ cwd }}/youki create -b tutorial a && sudo {{ cwd }}/youki start a && sudo {{ cwd }}/youki delete -f a'
# run linting on project
lint:
cargo fmt --all -- --check