Skip to content

Commit

Permalink
Add a hack-benchmark recipe
Browse files Browse the repository at this point in the history
We often use this to quickly get a sense of perf of a PR change.

Signed-off-by: yihuaf <yihuaf@unkies.org>
  • Loading branch information
yihuaf committed Jul 31, 2023
1 parent 3151278 commit a67d180
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a67d180

Please sign in to comment.