uv/scripts/benchmarks/compile.sh
Charlie Marsh 249ca10765
Move Puffin subcommands to a pip namespace (#921)
## Summary

This makes the separation clearer between the legacy `pip` API and the
API we'll add in the future for the package manager itself. It also
enables seamless `puffin pip` aliasing for those that want it.

Closes #918.
2024-01-15 16:36:45 +00:00

27 lines
756 B
Bash
Executable file

#!/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" \
"./target/release/puffin --no-cache pip-compile ${TARGET} > /tmp/requirements.txt" \
"./target/release/main --no-cache pip-compile ${TARGET} > /tmp/requirements.txt"
###
# Resolution with a warm cache.
###
hyperfine --runs 20 --warmup 3 --prepare "rm -f /tmp/requirements.txt" \
"./target/release/puffin pip compile ${TARGET} > /tmp/requirements.txt" \
"./target/release/main pip-compile ${TARGET} > /tmp/requirements.txt"