From a67d180dc059eb3295c7c9ebdc5e9cd0399f2e19 Mon Sep 17 00:00:00 2001 From: yihuaf Date: Mon, 31 Jul 2023 08:14:44 -0700 Subject: [PATCH] Add a hack-benchmark recipe We often use this to quickly get a sense of perf of a PR change. Signed-off-by: yihuaf --- justfile | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/justfile b/justfile index fc347b6bf..6bc22bdc1 100644 --- a/justfile +++ b/justfile @@ -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