uv/scripts
Charlie Marsh ac385c80ab
Add a script to benchmark against other tools (#800)
## Summary

Enables us to benchmark Puffin against `pip-tools` on a variety of
tasks. In subsequent PRs, I'll add support for Poetry and perhaps other
tools too.

Example usage:

```
❯ python scripts/bench.py -f requirements.in
2024-01-05 15:05:39 INFO Benchmarks: resolve-cold, resolve-warm
2024-01-05 15:05:39 INFO Tools: pip-tools, puffin
2024-01-05 15:05:39 INFO Reading requirements from: /Users/crmarsh/workspace/puffin/requirements.in
2024-01-05 15:05:39 INFO ```
2024-01-05 15:05:39 INFO black
2024-01-05 15:05:39 INFO ```
Benchmark 1: pip-tools (resolve-cold)
  Time (mean ± σ):     758.4 ms ±  15.1 ms    [User: 317.8 ms, System: 68.4 ms]
  Range (min … max):   738.1 ms … 786.7 ms    10 runs

Benchmark 1: puffin (resolve-cold)
  Time (mean ± σ):     213.5 ms ±  25.6 ms    [User: 34.6 ms, System: 27.9 ms]
  Range (min … max):   184.6 ms … 270.6 ms    12 runs

Benchmark 1: pip-tools (resolve-warm)
  Time (mean ± σ):     384.3 ms ±   6.7 ms    [User: 259.2 ms, System: 47.0 ms]
  Range (min … max):   376.0 ms … 399.6 ms    10 runs

Benchmark 1: puffin (resolve-warm)
  Time (mean ± σ):       8.0 ms ±   0.4 ms    [User: 4.4 ms, System: 5.0 ms]
  Range (min … max):     7.4 ms …  10.8 ms    209 runs
```
2024-01-05 21:08:20 +00:00
..
benchmarks Move dev requirements up a directory (#512) 2023-11-29 10:11:31 +00:00
compare_with_pip Fix compare_with_pip.py debug profile (#503) 2023-11-27 10:48:05 +00:00
editable-installs Rebase: Uninstall existing non-editable versions when installing editable requirements bug (#682) 2023-12-18 09:28:14 +00:00
popular_packages Finish install-many with pypi 10k most dependents (#732) 2023-12-27 09:42:51 -05:00
requirements Add boto3 requirements file (#778) 2024-01-04 11:29:45 -05:00
scenarios Bump packse to hide requires-python in docstrings when not relevant (#797) 2024-01-05 20:49:09 +00:00
bench.py Add a script to benchmark against other tools (#800) 2024-01-05 21:08:20 +00:00