mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2026-08-11 04:41:23 +00:00
The existing test_benchmark asserts a single request completes within 5ms, which catches gross connection-setup regressions but cannot see throughput changes: the effects we care about are tens of microseconds per request, a hundredth of that resolution. There was no way to answer "does this patch make the server faster" other than measuring by hand. Absolute req/s is not usable for that. Running the same binary five times on an idle 8-core machine gave 53.9k to 74.6k req/s, and shared CI runners are noisier still, so a number printed per push says nothing. Build both refs and measure them alternately in one session, flipping the order each round to cancel ordering bias, then report only the ratio of the medians. Whether that ratio means anything is decided by an exact permutation test rather than by comparing the change against the min/max spread - a single slow round is enough to make a spread check give up, while the rank test rides it out. Validated against a patch that removes a redundant poll() per request: individual measurements ranged 41.7k-93.9k req/s, yet nine rounds resolved a 1.244x speedup at p = 0.019. The same data truncated to five rounds was inconclusive, so the workflow defaults to nine. Manual dispatch only, Linux and non-SSL for now, and it never fails the build - this is a measurement, not a test.
61 lines
1.4 KiB
Makefile
61 lines
1.4 KiB
Makefile
set shell := ["bash", "-c"]
|
|
|
|
default: list
|
|
|
|
list:
|
|
@just --list --unsorted
|
|
|
|
openssl:
|
|
@(cd test && LSAN_OPTIONS=suppressions=lsan_suppressions.txt make)
|
|
@(cd test && make proxy)
|
|
|
|
openssl_parallel:
|
|
@(cd test && make test_openssl_parallel)
|
|
|
|
mbedtls:
|
|
@(cd test && make test_mbedtls && LSAN_OPTIONS=suppressions=lsan_suppressions.txt ./test_mbedtls)
|
|
@(cd test && make proxy_mbedtls)
|
|
|
|
mbedtls_parallel:
|
|
@(cd test && make test_mbedtls_parallel)
|
|
|
|
wolfssl:
|
|
@(cd test && make test_wolfssl && LSAN_OPTIONS=suppressions=lsan_suppressions.txt ./test_wolfssl)
|
|
@(cd test && make proxy_wolfssl)
|
|
|
|
wolfssl_parallel:
|
|
@(cd test && make test_wolfssl_parallel)
|
|
|
|
no_tls:
|
|
@(cd test && make test_no_tls && ./test_no_tls)
|
|
|
|
no_tls_parallel:
|
|
@(cd test && make test_no_tls_parallel)
|
|
|
|
others:
|
|
@(cd test && make fuzz_test)
|
|
@(cd test && make test_websocket_heartbeat && ./test_websocket_heartbeat)
|
|
@(cd test && make test_thread_pool && ./test_thread_pool)
|
|
@(cd test && make test_benchmark && ./test_benchmark)
|
|
|
|
build:
|
|
@(cd test && make test_split)
|
|
@(cd test && make test_split_mbedtls)
|
|
@(cd test && make test_split_wolfssl)
|
|
|
|
bench:
|
|
@(cd benchmark && make bench-all)
|
|
|
|
# A/B throughput comparison between two refs (see benchmark/ab.sh --help)
|
|
bench-ab *args:
|
|
@./benchmark/ab.sh {{args}}
|
|
|
|
docs-serve:
|
|
-@docs-gen serve docs-src --open
|
|
|
|
docs-check:
|
|
@docs-gen check docs-src
|
|
|
|
release *args:
|
|
@./scripts/release.sh {{args}}
|