Debian Codegraph @

hypothesis-python/benchmark/README.md

raw
1 This directory contains plotting code for our shrinker benchmarking. The code for collecting the data is in `conftest.py`. This directory handles plotting the results.
2
3 The plotting script (but not collecting benchmark data) requires additional dependencies: `pip install scipy vl-convert-python`.
4
5 To run a benchmark:
6
7 - `pytest tests/ -n auto --hypothesis-benchmark-shrinks new --hypothesis-benchmark-output data.json` (starting on the newer version)
8 - `pytest tests/ -n auto --hypothesis-benchmark-shrinks old --hypothesis-benchmark-output data.json` (after switching to the old version)
9 - Use the same `data.json` path, the benchmark will append data. You can append `-k ...` for both commands to subset the benchmark.
10 - `python benchmark/graph.py data.json shrinking.png`
11
12 This hooks any `minimal()` calls any reports the number of shrinks. Default (and currently unchangeable) number of iterations is 5 per test.