- cc — concurrency(同時接続数)。ab -c に渡す値で、同時に何リクエストを投げるかを指定
- reqs — total requests(総リクエスト数)。ab -n に渡す値で、1回のベンチマークで合計何リクエストを送るか
例えば cc=10 reqs=1000 は「10並列で計1000リクエストを送る」という意味。
$ bash benchmark/run_matrix.sh --markdown --long
| $ ruby -v | |
| ruby 3.4.2 (2025-02-15 revision d2930f8e7a) +PRISM [arm64-darwin24] | |
| $ gem list strscan | |
| *** LOCAL GEMS *** | |
| strscan (default: 3.1.2) | |
| $ benchmark-driver benchmark/rubykaigi_p39_check.yaml | |
| Warming up -------------------------------------- |
| -- [python] --------- | |
| * tests/algorithms/sqrt.py | |
| def abs(x): | |
| if x > 0: | |
| return x | |
| else: | |
| return -x | |
| def sqrt(x): | |
| eps = 1e-10 |
| $ cat broadcast.py | |
| from benchmarker import Benchmarker | |
| import numpy as np | |
| ## specify number of loop | |
| with Benchmarker(10000, width=20) as bench: | |
| @bench(None) ## empty loop | |
| def _(bm): | |
| x = np.ones([1000,784], dtype=np.float32) |