Files
uv/scripts/benchmarks/compile.sh
T

28 lines
748 B
Bash
Raw Normal View History

2023-10-08 19:37:38 -04:00
#!/usr/bin/env sh
###
# Benchmark the resolver against `pip-compile`.
#
# Example usage:
#
# ./scripts/benchmarks/compile.sh ./scripts/benchmarks/requirements.in
###
set -euxo pipefail
TARGET=${1}
###
# Resolution with a cold cache.
###
hyperfine --runs 20 --warmup 3 --prepare "rm -f /tmp/requirements.txt" \
2024-02-15 11:19:46 -06:00
"./target/release/uv --no-cache pip-compile ${TARGET} > /tmp/requirements.txt" \
"./target/release/main --no-cache pip-compile ${TARGET} > /tmp/requirements.txt"
2023-10-08 19:37:38 -04:00
###
# Resolution with a warm cache.
###
hyperfine --runs 20 --warmup 3 --prepare "rm -f /tmp/requirements.txt" \
2024-02-15 11:19:46 -06:00
"./target/release/uv pip compile ${TARGET} > /tmp/requirements.txt" \
"./target/release/main pip-compile ${TARGET} > /tmp/requirements.txt"