pyperformance
pyperformance copied to clipboard
Add `random` benchmarks
This PR is part of the work to remove cli flags for self-testing. Inspired by #222
sorry if i missed something, this is my first PR in this repo.
[53/80] random...
# /home/runner/work/pyperformance/pyperformance/venv/cpython3.10-c0f148b725b1-compat-e184a69aa441/bin/python -u /home/runner/work/pyperformance/pyperformance/pyperformance/data-files/benchmarks/bm_random/run_benchmark.py --debug-single-value --output /tmp/tmpewmu5gnc --inherit-environ PYPERFORMANCE_RUNID
Traceback (most recent call last):
File "/home/runner/work/pyperformance/pyperformance/pyperformance/data-files/benchmarks/bm_random/run_benchmark.py", line 32, in <module>
(random.binomialvariate, (15, 0.60)),
AttributeError: module 'random' has no attribute 'binomialvariate'. Did you mean: 'normalvariate'?
Command failed with exit code 1
Traceback (most recent call last):
File "/home/runner/work/pyperformance/pyperformance/pyperformance/run.py", line 171, in run_benchmarks
result = bench.run(
File "/home/runner/work/pyperformance/pyperformance/pyperformance/_benchmark.py", line 193, in run
bench = _run_perf_script(
File "/home/runner/work/pyperformance/pyperformance/pyperformance/_benchmark.py", line 250, in _run_perf_script
raise RuntimeError("Benchmark died")
RuntimeError: Benchmark died
ERROR: Benchmark random failed: Benchmark died