diff --git a/perf/request-response/README.md b/perf/request-response/README.md index 30396682..faed686b 100644 --- a/perf/request-response/README.md +++ b/perf/request-response/README.md @@ -240,7 +240,77 @@ and the database page −45%. ## End-to-end under `datasette serve` -E2E_PLACEHOLDER +These runs use a real `datasette serve` on the same 4-vCPU VM. A +stdlib-only keep-alive load generator (`tools/load.py`) runs in separate +processes with 8 connections. Each figure is the median of 5 interleaved +rounds of 6 seconds. "Server CPU per request" is the server process's +user+system CPU from `/proc`, divided by requests served, and is the +steadier of the two metrics. Run it with `tools/e2e_bench.py`. + +| Endpoint | Server | req/s | Server CPU per request | vs base | +|---|---|---:|---:|---:| +| `/-/actor.json + cookie` | cf113a5, stock serve (h11, access log) | 1,493 | 659 µs | – | +| `/-/actor.json + cookie` | cf113a5 + httptools | 2,162 | 461 µs | −30% | +| `/-/actor.json + cookie` | cf113a5, no access log | 1,805 | 560 µs | −15% | +| `/-/actor.json + cookie` | All patches, stock serve | 1,954 | 503 µs | −24% | +| `/-/actor.json + cookie` | All patches + httptools | 3,053 | 324 µs | −51% | +| `/-/actor.json + cookie` | All patches + httptools, no access log, Content-Length | 4,379 | 226 µs | −66% | +| `/-/versions.json` | cf113a5, stock serve (h11, access log) | 412 | 2,944 µs | – | +| `/-/versions.json` | cf113a5 + httptools | 446 | 2,761 µs | −6% | +| `/-/versions.json` | cf113a5, no access log | 432 | 2,825 µs | −4% | +| `/-/versions.json` | All patches, stock serve | 723 | 1,478 µs | −50% | +| `/-/versions.json` | All patches + httptools | 847 | 1,304 µs | −56% | +| `/-/versions.json` | All patches + httptools, no access log, Content-Length | 987 | 1,128 µs | −62% | +| `/-/static/app.css` | cf113a5, stock serve (h11, access log) | 166 | 6,954 µs | – | +| `/-/static/app.css` | cf113a5 + httptools | 190 | 6,034 µs | −13% | +| `/-/static/app.css` | cf113a5, no access log | 172 | 6,708 µs | −4% | +| `/-/static/app.css` | All patches, stock serve | 1,765 | 558 µs | −92% | +| `/-/static/app.css` | All patches + httptools | 2,314 | 424 µs | −94% | +| `/-/static/app.css` | All patches + httptools, no access log, Content-Length | 3,117 | 320 µs | −95% | +| `/fixtures/facetable.json?_size=5` | cf113a5, stock serve (h11, access log) | 79 | 15,866 µs | – | +| `/fixtures/facetable.json?_size=5` | cf113a5 + httptools | 80 | 15,952 µs | +1% | +| `/fixtures/facetable.json?_size=5` | cf113a5, no access log | 77 | 16,133 µs | +2% | +| `/fixtures/facetable.json?_size=5` | All patches, stock serve | 133 | 9,044 µs | −43% | +| `/fixtures/facetable.json?_size=5` | All patches + httptools | 139 | 8,713 µs | −45% | +| `/fixtures/facetable.json?_size=5` | All patches + httptools, no access log, Content-Length | 136 | 8,674 µs | −45% | + +Latency with a single connection (p50): + +| Endpoint | cf113a5 | All patches | All patches + httptools, no access log | +|---|---:|---:|---:| +| `/-/actor.json + cookie` | 681 µs | 582 µs | 334 µs | +| `/-/versions.json` | 2,403 µs | 988 µs | 772 µs | +| `/-/static/app.css` | 5,924 µs | 681 µs | 489 µs | +| `/fixtures/facetable.json?_size=5` | 6,393 µs | 3,832 µs | 3,781 µs | + +What this shows: + +- **The HTTP server is half the cost of a light request.** Profiling the + live server in `attach` mode showed uvicorn's layers taking 53–64% of + server CPU on `/-/actor.json` with stock `datasette serve`: h11 parsing + and serialising about 20%, socket I/O 15–18%, the access log 8–10%, and + uvicorn's protocol code 8–11%. Datasette's ASGI app was 26–38% and GC + 5–7%. So the patches' −61% in-process becomes −24% end to end on that + request. After the patches the HTTP layer is about two-thirds of what is + left. +- **Datasette runs on pure-Python h11 by default.** It depends on plain + `uvicorn`, so httptools is never installed. With httptools installed, + uvicorn's `http="auto"` picks it up with no code change. That alone cut + server CPU per request by 30% on `/-/actor.json`, or 36% once the patches + are applied. httptools 0.9.0 and uvloop 0.23.0 have cp315 wheels and + install cleanly on 3.15.0b4. +- **The uvicorn access log**, which is always on under `datasette serve`, + costs about 24 µs per request: 8–15% of a light request. +- **Static files gain the most**: 166 → 1,765 req/s with the patches on a + stock server, and 3,117 req/s with the server changes too. The 4 KB + thread-hop chunking was about 70% of static-asset cost under a real + server, more than in-process. +- **The table endpoint is limited by SQL thread round trips**, so it gains + from the DB-adjacent patches (79 → 133 req/s) and not from the HTTP + server changes. +- The `patched_best` variant's Content-Length change is an experiment, + monkeypatched in `tools/serve_variant.py`. It is not in `ALL-combined.diff` + and contributes about 3%. ## Bugs found along the way diff --git a/perf/request-response/results/e2e-latency.jsonl b/perf/request-response/results/e2e-latency.jsonl new file mode 100644 index 00000000..795276dd --- /dev/null +++ b/perf/request-response/results/e2e-latency.jsonl @@ -0,0 +1,36 @@ +{"label": "base", "path": "/-/actor.json", "connections": 1, "procs": 1, "requests": 5272, "elapsed_s": 4.001, "rps": 1317.7, "lat_us": {"mean": 755.9, "p50": 681.1, "p90": 964.8, "p99": 1793.8, "p99.9": 3513.1, "max": 11258.9}, "status": {"200": 5272}, "avg_body_bytes": 37, "errors": 0, "requests_total": 6511, "cpu_us_per_req": 708.0, "main_cpu_us_per_req": 706.5, "variant": "base", "endpoint": "actor", "round": 0, "kind": "lat", "ts": 1791854344.6748526} +{"label": "patched", "path": "/-/actor.json", "connections": 1, "procs": 1, "requests": 6546, "elapsed_s": 4.001, "rps": 1636.2, "lat_us": {"mean": 608.2, "p50": 574.0, "p90": 726.1, "p99": 1142.1, "p99.9": 2830.4, "max": 7612.3}, "status": {"200": 6546}, "avg_body_bytes": 37, "errors": 0, "requests_total": 8123, "cpu_us_per_req": 556.4, "main_cpu_us_per_req": 555.2, "variant": "patched", "endpoint": "actor", "round": 0, "kind": "lat", "ts": 1791854349.807752} +{"label": "patched_best", "path": "/-/actor.json", "connections": 1, "procs": 1, "requests": 10711, "elapsed_s": 4.0, "rps": 2677.5, "lat_us": {"mean": 370.7, "p50": 345.3, "p90": 462.8, "p99": 688.7, "p99.9": 2516.6, "max": 4077.5}, "status": {"200": 10711}, "avg_body_bytes": 37, "errors": 0, "requests_total": 13412, "cpu_us_per_req": 302.7, "main_cpu_us_per_req": 302.7, "variant": "patched_best", "endpoint": "actor", "round": 0, "kind": "lat", "ts": 1791854354.9526498} +{"label": "base", "path": "/-/versions.json", "connections": 1, "procs": 1, "requests": 1681, "elapsed_s": 4.002, "rps": 420.0, "lat_us": {"mean": 2379.0, "p50": 2221.2, "p90": 2944.3, "p99": 4510.3, "p99.9": 6404.1, "max": 8246.5}, "status": {"200": 1681}, "avg_body_bytes": 1423, "errors": 0, "requests_total": 2072, "cpu_us_per_req": 2292.5, "main_cpu_us_per_req": 1935.3, "variant": "base", "endpoint": "versions", "round": 0, "kind": "lat", "ts": 1791854360.083918} +{"label": "patched", "path": "/-/versions.json", "connections": 1, "procs": 1, "requests": 3823, "elapsed_s": 4.001, "rps": 955.6, "lat_us": {"mean": 1043.7, "p50": 984.9, "p90": 1270.0, "p99": 1804.6, "p99.9": 3450.4, "max": 13833.4}, "status": {"200": 3823}, "avg_body_bytes": 1423, "errors": 0, "requests_total": 4742, "cpu_us_per_req": 986.9, "main_cpu_us_per_req": 854.1, "variant": "patched", "endpoint": "versions", "round": 0, "kind": "lat", "ts": 1791854365.2208471} +{"label": "patched_best", "path": "/-/versions.json", "connections": 1, "procs": 1, "requests": 4829, "elapsed_s": 4.001, "rps": 1207.1, "lat_us": {"mean": 825.5, "p50": 771.7, "p90": 1003.5, "p99": 1581.7, "p99.9": 3430.3, "max": 9180.3}, "status": {"200": 4829}, "avg_body_bytes": 1423, "errors": 0, "requests_total": 6013, "cpu_us_per_req": 723.4, "main_cpu_us_per_req": 595.4, "variant": "patched_best", "endpoint": "versions", "round": 0, "kind": "lat", "ts": 1791854370.3584204} +{"label": "base", "path": "/-/static/app.css", "connections": 1, "procs": 1, "requests": 645, "elapsed_s": 4.001, "rps": 161.2, "lat_us": {"mean": 6197.8, "p50": 5802.9, "p90": 7908.6, "p99": 11054.9, "p99.9": 14584.1, "max": 16367.1}, "status": {"200": 645}, "avg_body_bytes": 83458, "errors": 0, "requests_total": 793, "cpu_us_per_req": 6179.1, "main_cpu_us_per_req": 4628.0, "variant": "base", "endpoint": "static_css", "round": 0, "kind": "lat", "ts": 1791854375.4951956} +{"label": "patched", "path": "/-/static/app.css", "connections": 1, "procs": 1, "requests": 5487, "elapsed_s": 4.0, "rps": 1371.6, "lat_us": {"mean": 725.7, "p50": 692.0, "p90": 864.5, "p99": 1203.6, "p99.9": 3303.2, "max": 7607.2}, "status": {"200": 5487}, "avg_body_bytes": 83458, "errors": 0, "requests_total": 6803, "cpu_us_per_req": 627.7, "main_cpu_us_per_req": 627.7, "variant": "patched", "endpoint": "static_css", "round": 0, "kind": "lat", "ts": 1791854380.6547694} +{"label": "patched_best", "path": "/-/static/app.css", "connections": 1, "procs": 1, "requests": 8033, "elapsed_s": 4.0, "rps": 2008.0, "lat_us": {"mean": 494.9, "p50": 458.1, "p90": 600.5, "p99": 921.3, "p99.9": 2334.4, "max": 48646.8}, "status": {"200": 8033}, "avg_body_bytes": 83458, "errors": 0, "requests_total": 9844, "cpu_us_per_req": 390.1, "main_cpu_us_per_req": 390.1, "variant": "patched_best", "endpoint": "static_css", "round": 0, "kind": "lat", "ts": 1791854385.8001962} +{"label": "base", "path": "/fixtures/facetable.json?_size=5", "connections": 1, "procs": 1, "requests": 614, "elapsed_s": 4.002, "rps": 153.4, "lat_us": {"mean": 6521.4, "p50": 6336.8, "p90": 7964.5, "p99": 10207.8, "p99.9": 11564.9, "max": 11606.6}, "status": {"200": 614}, "avg_body_bytes": 1251, "errors": 0, "requests_total": 756, "cpu_us_per_req": 6362.4, "main_cpu_us_per_req": 3822.8, "variant": "base", "endpoint": "facetable", "round": 0, "kind": "lat", "ts": 1791854390.9170716} +{"label": "patched", "path": "/fixtures/facetable.json?_size=5", "connections": 1, "procs": 1, "requests": 1029, "elapsed_s": 4.002, "rps": 257.1, "lat_us": {"mean": 3886.7, "p50": 3762.9, "p90": 4646.9, "p99": 6742.7, "p99.9": 10967.9, "max": 11544.5}, "status": {"200": 1029}, "avg_body_bytes": 1251, "errors": 0, "requests_total": 1276, "cpu_us_per_req": 3769.6, "main_cpu_us_per_req": 2500.0, "variant": "patched", "endpoint": "facetable", "round": 0, "kind": "lat", "ts": 1791854396.0389185} +{"label": "patched_best", "path": "/fixtures/facetable.json?_size=5", "connections": 1, "procs": 1, "requests": 1174, "elapsed_s": 4.001, "rps": 293.4, "lat_us": {"mean": 3405.6, "p50": 3292.0, "p90": 4119.3, "p99": 5618.2, "p99.9": 8413.5, "max": 14041.1}, "status": {"200": 1174}, "avg_body_bytes": 1251, "errors": 0, "requests_total": 1499, "cpu_us_per_req": 3228.8, "main_cpu_us_per_req": 2034.7, "variant": "patched_best", "endpoint": "facetable", "round": 0, "kind": "lat", "ts": 1791854401.1905272} +{"label": "patched_best", "path": "/-/actor.json", "connections": 1, "procs": 1, "requests": 10938, "elapsed_s": 4.001, "rps": 2734.2, "lat_us": {"mean": 362.8, "p50": 334.0, "p90": 452.8, "p99": 722.7, "p99.9": 2962.6, "max": 7132.4}, "status": {"200": 10938}, "avg_body_bytes": 37, "errors": 0, "requests_total": 13783, "cpu_us_per_req": 293.1, "main_cpu_us_per_req": 293.1, "variant": "patched_best", "endpoint": "actor", "round": 1, "kind": "lat", "ts": 1791854406.3821344} +{"label": "patched", "path": "/-/actor.json", "connections": 1, "procs": 1, "requests": 6427, "elapsed_s": 4.001, "rps": 1606.5, "lat_us": {"mean": 619.3, "p50": 582.8, "p90": 740.0, "p99": 1209.8, "p99.9": 2897.8, "max": 6008.9}, "status": {"200": 6427}, "avg_body_bytes": 37, "errors": 0, "requests_total": 8079, "cpu_us_per_req": 560.7, "main_cpu_us_per_req": 559.5, "variant": "patched", "endpoint": "actor", "round": 1, "kind": "lat", "ts": 1791854411.5287182} +{"label": "base", "path": "/-/actor.json", "connections": 1, "procs": 1, "requests": 5422, "elapsed_s": 4.001, "rps": 1355.3, "lat_us": {"mean": 735.1, "p50": 666.9, "p90": 884.8, "p99": 1646.2, "p99.9": 3588.7, "max": 43433.5}, "status": {"200": 5422}, "avg_body_bytes": 37, "errors": 0, "requests_total": 6708, "cpu_us_per_req": 693.2, "main_cpu_us_per_req": 693.2, "variant": "base", "endpoint": "actor", "round": 1, "kind": "lat", "ts": 1791854416.6570246} +{"label": "patched_best", "path": "/-/versions.json", "connections": 1, "procs": 1, "requests": 5107, "elapsed_s": 4.0, "rps": 1276.6, "lat_us": {"mean": 780.3, "p50": 737.5, "p90": 940.4, "p99": 1441.3, "p99.9": 2821.5, "max": 6665.6}, "status": {"200": 5107}, "avg_body_bytes": 1423, "errors": 0, "requests_total": 6260, "cpu_us_per_req": 712.5, "main_cpu_us_per_req": 595.8, "variant": "patched_best", "endpoint": "versions", "round": 1, "kind": "lat", "ts": 1791854421.7834036} +{"label": "patched", "path": "/-/versions.json", "connections": 1, "procs": 1, "requests": 3734, "elapsed_s": 4.001, "rps": 933.4, "lat_us": {"mean": 1068.3, "p50": 987.9, "p90": 1268.2, "p99": 2603.5, "p99.9": 6343.9, "max": 7820.6}, "status": {"200": 3734}, "avg_body_bytes": 1423, "errors": 0, "requests_total": 4745, "cpu_us_per_req": 971.5, "main_cpu_us_per_req": 838.8, "variant": "patched", "endpoint": "versions", "round": 1, "kind": "lat", "ts": 1791854426.90712} +{"label": "base", "path": "/-/versions.json", "connections": 1, "procs": 1, "requests": 1508, "elapsed_s": 4.001, "rps": 376.9, "lat_us": {"mean": 2650.8, "p50": 2428.8, "p90": 3523.8, "p99": 4845.6, "p99.9": 7675.5, "max": 9631.9}, "status": {"200": 1508}, "avg_body_bytes": 1423, "errors": 0, "requests_total": 1823, "cpu_us_per_req": 2578.2, "main_cpu_us_per_req": 2150.3, "variant": "base", "endpoint": "versions", "round": 1, "kind": "lat", "ts": 1791854432.049537} +{"label": "patched_best", "path": "/-/static/app.css", "connections": 1, "procs": 1, "requests": 6803, "elapsed_s": 4.0, "rps": 1700.6, "lat_us": {"mean": 584.7, "p50": 531.0, "p90": 752.4, "p99": 1442.4, "p99.9": 3780.4, "max": 11510.4}, "status": {"200": 6803}, "avg_body_bytes": 83458, "errors": 0, "requests_total": 8856, "cpu_us_per_req": 426.8, "main_cpu_us_per_req": 425.7, "variant": "patched_best", "endpoint": "static_css", "round": 1, "kind": "lat", "ts": 1791854437.1844158} +{"label": "patched", "path": "/-/static/app.css", "connections": 1, "procs": 1, "requests": 5409, "elapsed_s": 4.001, "rps": 1352.0, "lat_us": {"mean": 735.6, "p50": 681.0, "p90": 887.6, "p99": 1730.6, "p99.9": 3788.5, "max": 7960.3}, "status": {"200": 5409}, "avg_body_bytes": 83458, "errors": 0, "requests_total": 6848, "cpu_us_per_req": 633.8, "main_cpu_us_per_req": 633.8, "variant": "patched", "endpoint": "static_css", "round": 1, "kind": "lat", "ts": 1791854442.3154619} +{"label": "base", "path": "/-/static/app.css", "connections": 1, "procs": 1, "requests": 642, "elapsed_s": 4.007, "rps": 160.2, "lat_us": {"mean": 6239.3, "p50": 5923.9, "p90": 7866.9, "p99": 10085.9, "p99.9": 14455.2, "max": 16703.8}, "status": {"200": 642}, "avg_body_bytes": 83458, "errors": 0, "requests_total": 803, "cpu_us_per_req": 6239.1, "main_cpu_us_per_req": 4607.7, "variant": "base", "endpoint": "static_css", "round": 1, "kind": "lat", "ts": 1791854447.443372} +{"label": "patched_best", "path": "/fixtures/facetable.json?_size=5", "connections": 1, "procs": 1, "requests": 965, "elapsed_s": 4.005, "rps": 241.0, "lat_us": {"mean": 4147.4, "p50": 3832.4, "p90": 5534.8, "p99": 8382.7, "p99.9": 13183.3, "max": 26053.9}, "status": {"200": 965}, "avg_body_bytes": 1251, "errors": 0, "requests_total": 1232, "cpu_us_per_req": 3782.5, "main_cpu_us_per_req": 2402.6, "variant": "patched_best", "endpoint": "facetable", "round": 1, "kind": "lat", "ts": 1791854452.596277} +{"label": "patched", "path": "/fixtures/facetable.json?_size=5", "connections": 1, "procs": 1, "requests": 934, "elapsed_s": 4.004, "rps": 233.3, "lat_us": {"mean": 4283.3, "p50": 4067.7, "p90": 5452.8, "p99": 8389.3, "p99.9": 14585.9, "max": 15611.7}, "status": {"200": 934}, "avg_body_bytes": 1251, "errors": 0, "requests_total": 1180, "cpu_us_per_req": 3974.6, "main_cpu_us_per_req": 2610.2, "variant": "patched", "endpoint": "facetable", "round": 1, "kind": "lat", "ts": 1791854457.7599025} +{"label": "base", "path": "/fixtures/facetable.json?_size=5", "connections": 1, "procs": 1, "requests": 601, "elapsed_s": 4.005, "rps": 150.1, "lat_us": {"mean": 6670.0, "p50": 6393.1, "p90": 8145.0, "p99": 10881.5, "p99.9": 14631.4, "max": 22758.1}, "status": {"200": 601}, "avg_body_bytes": 1251, "errors": 0, "requests_total": 726, "cpu_us_per_req": 6528.9, "main_cpu_us_per_req": 3966.9, "variant": "base", "endpoint": "facetable", "round": 1, "kind": "lat", "ts": 1791854462.8897676} +{"label": "base", "path": "/-/actor.json", "connections": 1, "procs": 1, "requests": 5354, "elapsed_s": 4.0, "rps": 1338.4, "lat_us": {"mean": 743.9, "p50": 683.1, "p90": 865.7, "p99": 1776.9, "p99.9": 4472.2, "max": 12861.3}, "status": {"200": 5354}, "avg_body_bytes": 37, "errors": 0, "requests_total": 6730, "cpu_us_per_req": 674.6, "main_cpu_us_per_req": 676.1, "variant": "base", "endpoint": "actor", "round": 2, "kind": "lat", "ts": 1791854468.022463} +{"label": "patched", "path": "/-/actor.json", "connections": 1, "procs": 1, "requests": 6330, "elapsed_s": 4.0, "rps": 1582.4, "lat_us": {"mean": 628.9, "p50": 581.7, "p90": 779.5, "p99": 1216.6, "p99.9": 3756.3, "max": 13782.5}, "status": {"200": 6330}, "avg_body_bytes": 37, "errors": 0, "requests_total": 7980, "cpu_us_per_req": 570.2, "main_cpu_us_per_req": 570.2, "variant": "patched", "endpoint": "actor", "round": 2, "kind": "lat", "ts": 1791854473.1750185} +{"label": "patched_best", "path": "/-/actor.json", "connections": 1, "procs": 1, "requests": 11017, "elapsed_s": 4.0, "rps": 2754.0, "lat_us": {"mean": 360.4, "p50": 332.5, "p90": 454.5, "p99": 675.9, "p99.9": 2434.1, "max": 4662.2}, "status": {"200": 11017}, "avg_body_bytes": 37, "errors": 0, "requests_total": 13592, "cpu_us_per_req": 300.9, "main_cpu_us_per_req": 300.9, "variant": "patched_best", "endpoint": "actor", "round": 2, "kind": "lat", "ts": 1791854478.3325932} +{"label": "base", "path": "/-/versions.json", "connections": 1, "procs": 1, "requests": 1548, "elapsed_s": 4.001, "rps": 386.9, "lat_us": {"mean": 2581.8, "p50": 2402.5, "p90": 3213.9, "p99": 4277.6, "p99.9": 5903.3, "max": 52032.1}, "status": {"200": 1548}, "avg_body_bytes": 1423, "errors": 0, "requests_total": 1930, "cpu_us_per_req": 2450.8, "main_cpu_us_per_req": 2057.0, "variant": "base", "endpoint": "versions", "round": 2, "kind": "lat", "ts": 1791854483.4775877} +{"label": "patched", "path": "/-/versions.json", "connections": 1, "procs": 1, "requests": 3604, "elapsed_s": 4.002, "rps": 900.5, "lat_us": {"mean": 1107.5, "p50": 1010.6, "p90": 1380.6, "p99": 2332.1, "p99.9": 5863.9, "max": 25142.0}, "status": {"200": 3604}, "avg_body_bytes": 1423, "errors": 0, "requests_total": 4534, "cpu_us_per_req": 1010.1, "main_cpu_us_per_req": 871.2, "variant": "patched", "endpoint": "versions", "round": 2, "kind": "lat", "ts": 1791854488.6126986} +{"label": "patched_best", "path": "/-/versions.json", "connections": 1, "procs": 1, "requests": 4737, "elapsed_s": 4.001, "rps": 1184.1, "lat_us": {"mean": 841.4, "p50": 787.5, "p90": 1019.7, "p99": 1864.8, "p99.9": 3527.2, "max": 7619.4}, "status": {"200": 4737}, "avg_body_bytes": 1423, "errors": 0, "requests_total": 5853, "cpu_us_per_req": 743.2, "main_cpu_us_per_req": 606.5, "variant": "patched_best", "endpoint": "versions", "round": 2, "kind": "lat", "ts": 1791854493.7496607} +{"label": "base", "path": "/-/static/app.css", "connections": 1, "procs": 1, "requests": 635, "elapsed_s": 4.002, "rps": 158.7, "lat_us": {"mean": 6299.9, "p50": 6087.9, "p90": 7695.5, "p99": 11476.8, "p99.9": 16709.2, "max": 16745.7}, "status": {"200": 635}, "avg_body_bytes": 83458, "errors": 0, "requests_total": 791, "cpu_us_per_req": 6321.1, "main_cpu_us_per_req": 4665.0, "variant": "base", "endpoint": "static_css", "round": 2, "kind": "lat", "ts": 1791854498.8784947} +{"label": "patched", "path": "/-/static/app.css", "connections": 1, "procs": 1, "requests": 5612, "elapsed_s": 4.001, "rps": 1402.7, "lat_us": {"mean": 709.8, "p50": 666.0, "p90": 857.4, "p99": 1254.0, "p99.9": 4788.8, "max": 10501.3}, "status": {"200": 5612}, "avg_body_bytes": 83458, "errors": 0, "requests_total": 7015, "cpu_us_per_req": 615.8, "main_cpu_us_per_req": 615.8, "variant": "patched", "endpoint": "static_css", "round": 2, "kind": "lat", "ts": 1791854504.0174708} +{"label": "patched_best", "path": "/-/static/app.css", "connections": 1, "procs": 1, "requests": 7744, "elapsed_s": 4.001, "rps": 1935.6, "lat_us": {"mean": 513.5, "p50": 488.7, "p90": 619.8, "p99": 926.0, "p99.9": 2819.7, "max": 6803.4}, "status": {"200": 7744}, "avg_body_bytes": 83458, "errors": 0, "requests_total": 9894, "cpu_us_per_req": 391.1, "main_cpu_us_per_req": 391.1, "variant": "patched_best", "endpoint": "static_css", "round": 2, "kind": "lat", "ts": 1791854509.157529} +{"label": "base", "path": "/fixtures/facetable.json?_size=5", "connections": 1, "procs": 1, "requests": 512, "elapsed_s": 4.003, "rps": 127.9, "lat_us": {"mean": 7824.6, "p50": 7456.4, "p90": 9870.2, "p99": 13407.6, "p99.9": 14673.1, "max": 14764.7}, "status": {"200": 512}, "avg_body_bytes": 1251, "errors": 0, "requests_total": 639, "cpu_us_per_req": 7198.7, "main_cpu_us_per_req": 4350.5, "variant": "base", "endpoint": "facetable", "round": 2, "kind": "lat", "ts": 1791854514.299936} +{"label": "patched", "path": "/fixtures/facetable.json?_size=5", "connections": 1, "procs": 1, "requests": 984, "elapsed_s": 4.007, "rps": 245.5, "lat_us": {"mean": 4071.0, "p50": 3832.3, "p90": 5236.6, "p99": 7416.0, "p99.9": 19655.6, "max": 32329.2}, "status": {"200": 984}, "avg_body_bytes": 1251, "errors": 0, "requests_total": 1206, "cpu_us_per_req": 3905.5, "main_cpu_us_per_req": 2578.8, "variant": "patched", "endpoint": "facetable", "round": 2, "kind": "lat", "ts": 1791854519.4444175} +{"label": "patched_best", "path": "/fixtures/facetable.json?_size=5", "connections": 1, "procs": 1, "requests": 1012, "elapsed_s": 4.003, "rps": 252.8, "lat_us": {"mean": 3950.9, "p50": 3781.3, "p90": 4962.6, "p99": 6816.0, "p99.9": 12007.2, "max": 26841.6}, "status": {"200": 1012}, "avg_body_bytes": 1251, "errors": 0, "requests_total": 1234, "cpu_us_per_req": 3760.1, "main_cpu_us_per_req": 2366.3, "variant": "patched_best", "endpoint": "facetable", "round": 2, "kind": "lat", "ts": 1791854524.6069133} diff --git a/perf/request-response/results/e2e-throughput.jsonl b/perf/request-response/results/e2e-throughput.jsonl new file mode 100644 index 00000000..a3c4c6d2 --- /dev/null +++ b/perf/request-response/results/e2e-throughput.jsonl @@ -0,0 +1,120 @@ +{"label": "base", "path": "/-/actor.json", "connections": 8, "procs": 2, "requests": 8610, "elapsed_s": 6.005, "rps": 1433.8, "lat_us": {"mean": 5576.0, "p50": 5029.1, "p90": 7245.4, "p99": 9863.9, "p99.9": 48082.2, "max": 79846.5}, "status": {"200": 8610}, "avg_body_bytes": 37, "errors": 0, "requests_total": 10241, "cpu_us_per_req": 675.7, "main_cpu_us_per_req": 673.8, "variant": "base", "endpoint": "actor", "round": 0, "kind": "tput", "ts": 1791853483.3384964} +{"label": "httptools", "path": "/-/actor.json", "connections": 8, "procs": 2, "requests": 12982, "elapsed_s": 6.003, "rps": 2162.4, "lat_us": {"mean": 3696.2, "p50": 3376.8, "p90": 4612.8, "p99": 6388.5, "p99.9": 25833.8, "max": 46080.4}, "status": {"200": 12982}, "avg_body_bytes": 37, "errors": 0, "requests_total": 15062, "cpu_us_per_req": 461.4, "main_cpu_us_per_req": 459.4, "variant": "httptools", "endpoint": "actor", "round": 0, "kind": "tput", "ts": 1791853490.53309} +{"label": "h11_nolog", "path": "/-/actor.json", "connections": 8, "procs": 2, "requests": 10834, "elapsed_s": 6.003, "rps": 1804.8, "lat_us": {"mean": 4430.6, "p50": 4052.9, "p90": 5630.8, "p99": 7270.5, "p99.9": 39997.2, "max": 54099.9}, "status": {"200": 10834}, "avg_body_bytes": 37, "errors": 0, "requests_total": 12354, "cpu_us_per_req": 560.1, "main_cpu_us_per_req": 558.5, "variant": "h11_nolog", "endpoint": "actor", "round": 0, "kind": "tput", "ts": 1791853497.7487586} +{"label": "patched", "path": "/-/actor.json", "connections": 8, "procs": 2, "requests": 11995, "elapsed_s": 6.003, "rps": 1998.1, "lat_us": {"mean": 4001.0, "p50": 3684.9, "p90": 5012.1, "p99": 6026.7, "p99.9": 15868.8, "max": 80760.6}, "status": {"200": 11995}, "avg_body_bytes": 37, "errors": 0, "requests_total": 13928, "cpu_us_per_req": 492.5, "main_cpu_us_per_req": 491.8, "variant": "patched", "endpoint": "actor", "round": 0, "kind": "tput", "ts": 1791853504.9308178} +{"label": "patched_httptools", "path": "/-/actor.json", "connections": 8, "procs": 2, "requests": 18197, "elapsed_s": 6.004, "rps": 3031.0, "lat_us": {"mean": 2635.9, "p50": 2416.9, "p90": 3490.3, "p99": 4459.2, "p99.9": 10157.7, "max": 16581.4}, "status": {"200": 18197}, "avg_body_bytes": 37, "errors": 0, "requests_total": 21082, "cpu_us_per_req": 326.8, "main_cpu_us_per_req": 327.3, "variant": "patched_httptools", "endpoint": "actor", "round": 0, "kind": "tput", "ts": 1791853512.1085038} +{"label": "patched_best", "path": "/-/actor.json", "connections": 8, "procs": 2, "requests": 26430, "elapsed_s": 6.001, "rps": 4403.9, "lat_us": {"mean": 1813.8, "p50": 1703.8, "p90": 2211.5, "p99": 3091.1, "p99.9": 5482.6, "max": 13266.9}, "status": {"200": 26430}, "avg_body_bytes": 37, "errors": 0, "requests_total": 30638, "cpu_us_per_req": 225.5, "main_cpu_us_per_req": 225.2, "variant": "patched_best", "endpoint": "actor", "round": 0, "kind": "tput", "ts": 1791853519.2843888} +{"label": "base", "path": "/-/versions.json", "connections": 8, "procs": 2, "requests": 2515, "elapsed_s": 6.01, "rps": 418.5, "lat_us": {"mean": 19122.3, "p50": 18115.3, "p90": 23254.3, "p99": 30724.3, "p99.9": 77250.1, "max": 99363.0}, "status": {"200": 2515}, "avg_body_bytes": 1423, "errors": 0, "requests_total": 2944, "cpu_us_per_req": 2870.2, "main_cpu_us_per_req": 2085.6, "variant": "base", "endpoint": "versions", "round": 0, "kind": "tput", "ts": 1791853526.4555924} +{"label": "httptools", "path": "/-/versions.json", "connections": 8, "procs": 2, "requests": 2995, "elapsed_s": 6.015, "rps": 498.0, "lat_us": {"mean": 16074.5, "p50": 15266.1, "p90": 19356.9, "p99": 25695.6, "p99.9": 63933.3, "max": 68945.6}, "status": {"200": 2995}, "avg_body_bytes": 1423, "errors": 0, "requests_total": 3458, "cpu_us_per_req": 2463.9, "main_cpu_us_per_req": 1743.8, "variant": "httptools", "endpoint": "versions", "round": 0, "kind": "tput", "ts": 1791853533.6307242} +{"label": "h11_nolog", "path": "/-/versions.json", "connections": 8, "procs": 2, "requests": 2767, "elapsed_s": 6.01, "rps": 460.4, "lat_us": {"mean": 17381.9, "p50": 16208.8, "p90": 21847.5, "p99": 32105.6, "p99.9": 73143.4, "max": 77267.8}, "status": {"200": 2767}, "avg_body_bytes": 1423, "errors": 0, "requests_total": 3245, "cpu_us_per_req": 2597.8, "main_cpu_us_per_req": 1852.1, "variant": "h11_nolog", "endpoint": "versions", "round": 0, "kind": "tput", "ts": 1791853540.8117378} +{"label": "patched", "path": "/-/versions.json", "connections": 8, "procs": 2, "requests": 4893, "elapsed_s": 6.005, "rps": 814.8, "lat_us": {"mean": 9821.7, "p50": 9532.3, "p90": 12741.9, "p99": 17063.9, "p99.9": 22103.7, "max": 29107.5}, "status": {"200": 4893}, "avg_body_bytes": 1423, "errors": 0, "requests_total": 5647, "cpu_us_per_req": 1351.2, "main_cpu_us_per_req": 950.9, "variant": "patched", "endpoint": "versions", "round": 0, "kind": "tput", "ts": 1791853547.997487} +{"label": "patched_httptools", "path": "/-/versions.json", "connections": 8, "procs": 2, "requests": 5221, "elapsed_s": 6.005, "rps": 869.5, "lat_us": {"mean": 9203.9, "p50": 8883.7, "p90": 12279.0, "p99": 17588.1, "p99.9": 22269.0, "max": 42337.7}, "status": {"200": 5221}, "avg_body_bytes": 1423, "errors": 0, "requests_total": 6140, "cpu_us_per_req": 1239.4, "main_cpu_us_per_req": 819.2, "variant": "patched_httptools", "endpoint": "versions", "round": 0, "kind": "tput", "ts": 1791853555.162508} +{"label": "patched_best", "path": "/-/versions.json", "connections": 8, "procs": 2, "requests": 6365, "elapsed_s": 6.004, "rps": 1060.2, "lat_us": {"mean": 7544.3, "p50": 7218.8, "p90": 9921.1, "p99": 13952.8, "p99.9": 31505.2, "max": 33789.5}, "status": {"200": 6365}, "avg_body_bytes": 1423, "errors": 0, "requests_total": 7418, "cpu_us_per_req": 1052.8, "main_cpu_us_per_req": 661.9, "variant": "patched_best", "endpoint": "versions", "round": 0, "kind": "tput", "ts": 1791853562.3247018} +{"label": "base", "path": "/-/static/app.css", "connections": 8, "procs": 2, "requests": 1071, "elapsed_s": 6.016, "rps": 178.0, "lat_us": {"mean": 45036.6, "p50": 45130.5, "p90": 52905.5, "p99": 60402.4, "p99.9": 67453.5, "max": 67933.7}, "status": {"200": 1071}, "avg_body_bytes": 83458, "errors": 0, "requests_total": 1245, "cpu_us_per_req": 6490.0, "main_cpu_us_per_req": 4465.9, "variant": "base", "endpoint": "static_css", "round": 0, "kind": "tput", "ts": 1791853569.528797} +{"label": "httptools", "path": "/-/static/app.css", "connections": 8, "procs": 2, "requests": 1175, "elapsed_s": 6.02, "rps": 195.2, "lat_us": {"mean": 41109.1, "p50": 40842.7, "p90": 49695.7, "p99": 60869.4, "p99.9": 68831.2, "max": 70518.6}, "status": {"200": 1175}, "avg_body_bytes": 83458, "errors": 0, "requests_total": 1367, "cpu_us_per_req": 5983.9, "main_cpu_us_per_req": 3913.7, "variant": "httptools", "endpoint": "static_css", "round": 0, "kind": "tput", "ts": 1791853576.697233} +{"label": "h11_nolog", "path": "/-/static/app.css", "connections": 8, "procs": 2, "requests": 1200, "elapsed_s": 6.019, "rps": 199.4, "lat_us": {"mean": 40264.9, "p50": 39665.9, "p90": 47272.4, "p99": 55394.9, "p99.9": 59871.5, "max": 62109.5}, "status": {"200": 1200}, "avg_body_bytes": 83458, "errors": 0, "requests_total": 1384, "cpu_us_per_req": 5917.6, "main_cpu_us_per_req": 3916.2, "variant": "h11_nolog", "endpoint": "static_css", "round": 0, "kind": "tput", "ts": 1791853583.8795004} +{"label": "patched", "path": "/-/static/app.css", "connections": 8, "procs": 2, "requests": 10677, "elapsed_s": 6.005, "rps": 1777.9, "lat_us": {"mean": 4496.6, "p50": 4254.5, "p90": 5456.7, "p99": 6854.9, "p99.9": 10347.7, "max": 13235.9}, "status": {"200": 10677}, "avg_body_bytes": 83458, "errors": 0, "requests_total": 12392, "cpu_us_per_req": 557.6, "main_cpu_us_per_req": 556.8, "variant": "patched", "endpoint": "static_css", "round": 0, "kind": "tput", "ts": 1791853591.0720968} +{"label": "patched_httptools", "path": "/-/static/app.css", "connections": 8, "procs": 2, "requests": 13900, "elapsed_s": 6.007, "rps": 2313.9, "lat_us": {"mean": 3453.8, "p50": 3183.6, "p90": 4409.9, "p99": 6039.0, "p99.9": 10748.8, "max": 38331.2}, "status": {"200": 13900}, "avg_body_bytes": 83458, "errors": 0, "requests_total": 16182, "cpu_us_per_req": 424.5, "main_cpu_us_per_req": 425.2, "variant": "patched_httptools", "endpoint": "static_css", "round": 0, "kind": "tput", "ts": 1791853598.234397} +{"label": "patched_best", "path": "/-/static/app.css", "connections": 8, "procs": 2, "requests": 18841, "elapsed_s": 6.002, "rps": 3139.2, "lat_us": {"mean": 2545.2, "p50": 2382.0, "p90": 3027.6, "p99": 4910.5, "p99.9": 7704.4, "max": 27730.5}, "status": {"200": 18841}, "avg_body_bytes": 83458, "errors": 0, "requests_total": 21690, "cpu_us_per_req": 320.0, "main_cpu_us_per_req": 318.6, "variant": "patched_best", "endpoint": "static_css", "round": 0, "kind": "tput", "ts": 1791853605.4233015} +{"label": "base", "path": "/fixtures/facetable.json?_size=5", "connections": 8, "procs": 2, "requests": 477, "elapsed_s": 6.052, "rps": 78.8, "lat_us": {"mean": 101654.8, "p50": 101107.0, "p90": 117166.9, "p99": 136707.7, "p99.9": 175244.3, "max": 175244.3}, "status": {"200": 477}, "avg_body_bytes": 1251, "errors": 0, "requests_total": 554, "cpu_us_per_req": 15866.4, "main_cpu_us_per_req": 6046.9, "variant": "base", "endpoint": "facetable", "round": 0, "kind": "tput", "ts": 1791853612.651223} +{"label": "httptools", "path": "/fixtures/facetable.json?_size=5", "connections": 8, "procs": 2, "requests": 481, "elapsed_s": 6.053, "rps": 79.5, "lat_us": {"mean": 101672.3, "p50": 99085.6, "p90": 121644.7, "p99": 175682.7, "p99.9": 199176.5, "max": 199176.5}, "status": {"200": 481}, "avg_body_bytes": 1251, "errors": 0, "requests_total": 556, "cpu_us_per_req": 15989.2, "main_cpu_us_per_req": 5881.3, "variant": "httptools", "endpoint": "facetable", "round": 0, "kind": "tput", "ts": 1791853619.8592162} +{"label": "h11_nolog", "path": "/fixtures/facetable.json?_size=5", "connections": 8, "procs": 2, "requests": 486, "elapsed_s": 6.055, "rps": 80.3, "lat_us": {"mean": 100475.2, "p50": 97830.8, "p90": 118708.4, "p99": 159263.5, "p99.9": 168799.9, "max": 168799.9}, "status": {"200": 486}, "avg_body_bytes": 1251, "errors": 0, "requests_total": 558, "cpu_us_per_req": 15788.5, "main_cpu_us_per_req": 5860.2, "variant": "h11_nolog", "endpoint": "facetable", "round": 0, "kind": "tput", "ts": 1791853627.0716221} +{"label": "patched", "path": "/fixtures/facetable.json?_size=5", "connections": 8, "procs": 2, "requests": 876, "elapsed_s": 6.043, "rps": 145.0, "lat_us": {"mean": 55378.7, "p50": 53912.3, "p90": 66704.2, "p99": 86034.5, "p99.9": 116403.9, "max": 122157.4}, "status": {"200": 876}, "avg_body_bytes": 1251, "errors": 0, "requests_total": 1025, "cpu_us_per_req": 8351.2, "main_cpu_us_per_req": 3570.7, "variant": "patched", "endpoint": "facetable", "round": 0, "kind": "tput", "ts": 1791853634.2843142} +{"label": "patched_httptools", "path": "/fixtures/facetable.json?_size=5", "connections": 8, "procs": 2, "requests": 838, "elapsed_s": 6.04, "rps": 138.7, "lat_us": {"mean": 57839.9, "p50": 56862.4, "p90": 68919.4, "p99": 89217.9, "p99.9": 124082.7, "max": 130283.2}, "status": {"200": 838}, "avg_body_bytes": 1251, "errors": 0, "requests_total": 979, "cpu_us_per_req": 8713.0, "main_cpu_us_per_req": 3626.1, "variant": "patched_httptools", "endpoint": "facetable", "round": 0, "kind": "tput", "ts": 1791853641.4794793} +{"label": "patched_best", "path": "/fixtures/facetable.json?_size=5", "connections": 8, "procs": 2, "requests": 949, "elapsed_s": 6.032, "rps": 157.3, "lat_us": {"mean": 51143.8, "p50": 50103.8, "p90": 60752.6, "p99": 76592.1, "p99.9": 98955.5, "max": 103139.8}, "status": {"200": 949}, "avg_body_bytes": 1251, "errors": 0, "requests_total": 1089, "cpu_us_per_req": 8044.1, "main_cpu_us_per_req": 3177.2, "variant": "patched_best", "endpoint": "facetable", "round": 0, "kind": "tput", "ts": 1791853648.7007213} +{"label": "patched_best", "path": "/-/actor.json", "connections": 8, "procs": 2, "requests": 26278, "elapsed_s": 6.001, "rps": 4378.7, "lat_us": {"mean": 1824.2, "p50": 1711.8, "p90": 2216.5, "p99": 3213.7, "p99.9": 5390.7, "max": 10732.3}, "status": {"200": 26278}, "avg_body_bytes": 37, "errors": 0, "requests_total": 30678, "cpu_us_per_req": 226.2, "main_cpu_us_per_req": 226.2, "variant": "patched_best", "endpoint": "actor", "round": 1, "kind": "tput", "ts": 1791853655.8834286} +{"label": "patched_httptools", "path": "/-/actor.json", "connections": 8, "procs": 2, "requests": 18709, "elapsed_s": 6.002, "rps": 3117.1, "lat_us": {"mean": 2563.5, "p50": 2421.5, "p90": 2940.3, "p99": 4526.5, "p99.9": 10843.9, "max": 17481.7}, "status": {"200": 18709}, "avg_body_bytes": 37, "errors": 0, "requests_total": 21672, "cpu_us_per_req": 318.8, "main_cpu_us_per_req": 318.8, "variant": "patched_httptools", "endpoint": "actor", "round": 1, "kind": "tput", "ts": 1791853663.069991} +{"label": "patched", "path": "/-/actor.json", "connections": 8, "procs": 2, "requests": 11707, "elapsed_s": 6.003, "rps": 1950.3, "lat_us": {"mean": 4099.6, "p50": 3824.1, "p90": 5192.9, "p99": 7018.6, "p99.9": 11790.7, "max": 16857.0}, "status": {"200": 11707}, "avg_body_bytes": 37, "errors": 0, "requests_total": 13683, "cpu_us_per_req": 502.8, "main_cpu_us_per_req": 502.1, "variant": "patched", "endpoint": "actor", "round": 1, "kind": "tput", "ts": 1791853670.2672915} +{"label": "h11_nolog", "path": "/-/actor.json", "connections": 8, "procs": 2, "requests": 11208, "elapsed_s": 6.006, "rps": 1866.3, "lat_us": {"mean": 4283.0, "p50": 3960.8, "p90": 5097.4, "p99": 7733.7, "p99.9": 13111.3, "max": 44512.7}, "status": {"200": 11208}, "avg_body_bytes": 37, "errors": 0, "requests_total": 13088, "cpu_us_per_req": 530.3, "main_cpu_us_per_req": 529.5, "variant": "h11_nolog", "endpoint": "actor", "round": 1, "kind": "tput", "ts": 1791853677.4698217} +{"label": "httptools", "path": "/-/actor.json", "connections": 8, "procs": 2, "requests": 14051, "elapsed_s": 6.003, "rps": 2340.7, "lat_us": {"mean": 3414.6, "p50": 3182.1, "p90": 4102.8, "p99": 5806.3, "p99.9": 9458.1, "max": 36382.4}, "status": {"200": 14051}, "avg_body_bytes": 37, "errors": 0, "requests_total": 16296, "cpu_us_per_req": 427.7, "main_cpu_us_per_req": 427.1, "variant": "httptools", "endpoint": "actor", "round": 1, "kind": "tput", "ts": 1791853684.6316848} +{"label": "base", "path": "/-/actor.json", "connections": 8, "procs": 2, "requests": 8960, "elapsed_s": 6.003, "rps": 1492.6, "lat_us": {"mean": 5384.7, "p50": 4943.5, "p90": 6679.0, "p99": 9926.2, "p99.9": 47848.2, "max": 83686.2}, "status": {"200": 8960}, "avg_body_bytes": 37, "errors": 0, "requests_total": 10449, "cpu_us_per_req": 659.4, "main_cpu_us_per_req": 657.5, "variant": "base", "endpoint": "actor", "round": 1, "kind": "tput", "ts": 1791853691.7925413} +{"label": "patched_best", "path": "/-/versions.json", "connections": 8, "procs": 2, "requests": 6093, "elapsed_s": 6.005, "rps": 1014.7, "lat_us": {"mean": 7885.4, "p50": 7486.7, "p90": 10528.1, "p99": 15909.6, "p99.9": 24683.7, "max": 47145.9}, "status": {"200": 6093}, "avg_body_bytes": 1423, "errors": 0, "requests_total": 7018, "cpu_us_per_req": 1104.3, "main_cpu_us_per_req": 693.9, "variant": "patched_best", "endpoint": "versions", "round": 1, "kind": "tput", "ts": 1791853698.9673102} +{"label": "patched_httptools", "path": "/-/versions.json", "connections": 8, "procs": 2, "requests": 5242, "elapsed_s": 6.007, "rps": 872.7, "lat_us": {"mean": 9168.0, "p50": 8749.8, "p90": 12230.8, "p99": 17402.9, "p99.9": 22095.2, "max": 39913.1}, "status": {"200": 5242}, "avg_body_bytes": 1423, "errors": 0, "requests_total": 6150, "cpu_us_per_req": 1240.7, "main_cpu_us_per_req": 811.4, "variant": "patched_httptools", "endpoint": "versions", "round": 1, "kind": "tput", "ts": 1791853706.1345468} +{"label": "patched", "path": "/-/versions.json", "connections": 8, "procs": 2, "requests": 4344, "elapsed_s": 6.005, "rps": 723.4, "lat_us": {"mean": 11061.2, "p50": 10681.1, "p90": 14607.0, "p99": 19568.9, "p99.9": 26021.7, "max": 36500.8}, "status": {"200": 4344}, "avg_body_bytes": 1423, "errors": 0, "requests_total": 5088, "cpu_us_per_req": 1478.0, "main_cpu_us_per_req": 1039.7, "variant": "patched", "endpoint": "versions", "round": 1, "kind": "tput", "ts": 1791853713.304724} +{"label": "h11_nolog", "path": "/-/versions.json", "connections": 8, "procs": 2, "requests": 2263, "elapsed_s": 6.02, "rps": 375.9, "lat_us": {"mean": 21295.3, "p50": 20188.0, "p90": 26299.0, "p99": 37237.2, "p99.9": 87731.0, "max": 113986.1}, "status": {"200": 2263}, "avg_body_bytes": 1423, "errors": 0, "requests_total": 2657, "cpu_us_per_req": 3101.2, "main_cpu_us_per_req": 2205.5, "variant": "h11_nolog", "endpoint": "versions", "round": 1, "kind": "tput", "ts": 1791853720.532532} +{"label": "httptools", "path": "/-/versions.json", "connections": 8, "procs": 2, "requests": 2542, "elapsed_s": 6.009, "rps": 423.0, "lat_us": {"mean": 18922.7, "p50": 18090.9, "p90": 23898.3, "p99": 31091.0, "p99.9": 66506.0, "max": 93717.5}, "status": {"200": 2542}, "avg_body_bytes": 1423, "errors": 0, "requests_total": 2927, "cpu_us_per_req": 2845.9, "main_cpu_us_per_req": 2029.4, "variant": "httptools", "endpoint": "versions", "round": 1, "kind": "tput", "ts": 1791853727.7154038} +{"label": "base", "path": "/-/versions.json", "connections": 8, "procs": 2, "requests": 2499, "elapsed_s": 6.019, "rps": 415.2, "lat_us": {"mean": 19281.5, "p50": 18116.0, "p90": 24260.6, "p99": 31390.7, "p99.9": 78964.1, "max": 85717.5}, "status": {"200": 2499}, "avg_body_bytes": 1423, "errors": 0, "requests_total": 2871, "cpu_us_per_req": 2911.9, "main_cpu_us_per_req": 2110.8, "variant": "base", "endpoint": "versions", "round": 1, "kind": "tput", "ts": 1791853734.9082606} +{"label": "patched_best", "path": "/-/static/app.css", "connections": 8, "procs": 2, "requests": 18358, "elapsed_s": 6.002, "rps": 3058.5, "lat_us": {"mean": 2612.8, "p50": 2397.4, "p90": 3490.9, "p99": 4752.2, "p99.9": 7149.7, "max": 9774.9}, "status": {"200": 18358}, "avg_body_bytes": 83458, "errors": 0, "requests_total": 21442, "cpu_us_per_req": 322.3, "main_cpu_us_per_req": 321.8, "variant": "patched_best", "endpoint": "static_css", "round": 1, "kind": "tput", "ts": 1791853742.10239} +{"label": "patched_httptools", "path": "/-/static/app.css", "connections": 8, "procs": 2, "requests": 14221, "elapsed_s": 6.002, "rps": 2369.3, "lat_us": {"mean": 3373.5, "p50": 3133.3, "p90": 4428.8, "p99": 5659.3, "p99.9": 8881.1, "max": 11671.2}, "status": {"200": 14221}, "avg_body_bytes": 83458, "errors": 0, "requests_total": 16659, "cpu_us_per_req": 416.0, "main_cpu_us_per_req": 416.0, "variant": "patched_httptools", "endpoint": "static_css", "round": 1, "kind": "tput", "ts": 1791853749.2672923} +{"label": "patched", "path": "/-/static/app.css", "connections": 8, "procs": 2, "requests": 10600, "elapsed_s": 6.004, "rps": 1765.4, "lat_us": {"mean": 4527.8, "p50": 4227.0, "p90": 5509.7, "p99": 7954.8, "p99.9": 14053.1, "max": 18203.7}, "status": {"200": 10600}, "avg_body_bytes": 83458, "errors": 0, "requests_total": 12507, "cpu_us_per_req": 550.9, "main_cpu_us_per_req": 550.9, "variant": "patched", "endpoint": "static_css", "round": 1, "kind": "tput", "ts": 1791853756.4751494} +{"label": "h11_nolog", "path": "/-/static/app.css", "connections": 8, "procs": 2, "requests": 1111, "elapsed_s": 6.023, "rps": 184.5, "lat_us": {"mean": 43430.4, "p50": 43300.2, "p90": 51568.0, "p99": 61902.8, "p99.9": 67885.0, "max": 68800.3}, "status": {"200": 1111}, "avg_body_bytes": 83458, "errors": 0, "requests_total": 1287, "cpu_us_per_req": 6301.5, "main_cpu_us_per_req": 4242.4, "variant": "h11_nolog", "endpoint": "static_css", "round": 1, "kind": "tput", "ts": 1791853763.6728675} +{"label": "httptools", "path": "/-/static/app.css", "connections": 8, "procs": 2, "requests": 1141, "elapsed_s": 6.021, "rps": 189.5, "lat_us": {"mean": 42238.4, "p50": 41611.9, "p90": 49443.6, "p99": 72040.7, "p99.9": 87875.1, "max": 89037.8}, "status": {"200": 1141}, "avg_body_bytes": 83458, "errors": 0, "requests_total": 1349, "cpu_us_per_req": 6034.1, "main_cpu_us_per_req": 3973.3, "variant": "httptools", "endpoint": "static_css", "round": 1, "kind": "tput", "ts": 1791853770.842176} +{"label": "base", "path": "/-/static/app.css", "connections": 8, "procs": 2, "requests": 1105, "elapsed_s": 6.031, "rps": 183.2, "lat_us": {"mean": 43758.1, "p50": 43154.1, "p90": 52827.8, "p99": 61882.5, "p99.9": 72459.7, "max": 73120.6}, "status": {"200": 1105}, "avg_body_bytes": 83458, "errors": 0, "requests_total": 1271, "cpu_us_per_req": 6302.1, "main_cpu_us_per_req": 4303.7, "variant": "base", "endpoint": "static_css", "round": 1, "kind": "tput", "ts": 1791853778.0250947} +{"label": "patched_best", "path": "/fixtures/facetable.json?_size=5", "connections": 8, "procs": 2, "requests": 822, "elapsed_s": 6.028, "rps": 136.4, "lat_us": {"mean": 58865.3, "p50": 58289.3, "p90": 69737.0, "p99": 81043.3, "p99.9": 86618.4, "max": 88045.6}, "status": {"200": 822}, "avg_body_bytes": 1251, "errors": 0, "requests_total": 973, "cpu_us_per_req": 8674.2, "main_cpu_us_per_req": 3525.2, "variant": "patched_best", "endpoint": "facetable", "round": 1, "kind": "tput", "ts": 1791853785.2210581} +{"label": "patched_httptools", "path": "/fixtures/facetable.json?_size=5", "connections": 8, "procs": 2, "requests": 904, "elapsed_s": 6.026, "rps": 150.0, "lat_us": {"mean": 53548.2, "p50": 52711.1, "p90": 62970.6, "p99": 73956.7, "p99.9": 79306.2, "max": 81450.5}, "status": {"200": 904}, "avg_body_bytes": 1251, "errors": 0, "requests_total": 1035, "cpu_us_per_req": 8299.5, "main_cpu_us_per_req": 3410.6, "variant": "patched_httptools", "endpoint": "facetable", "round": 1, "kind": "tput", "ts": 1791853792.4059935} +{"label": "patched", "path": "/fixtures/facetable.json?_size=5", "connections": 8, "procs": 2, "requests": 844, "elapsed_s": 6.017, "rps": 140.3, "lat_us": {"mean": 57271.8, "p50": 55802.2, "p90": 68802.7, "p99": 85394.2, "p99.9": 91025.7, "max": 91289.6}, "status": {"200": 844}, "avg_body_bytes": 1251, "errors": 0, "requests_total": 993, "cpu_us_per_req": 8600.2, "main_cpu_us_per_req": 3655.6, "variant": "patched", "endpoint": "facetable", "round": 1, "kind": "tput", "ts": 1791853799.5721748} +{"label": "h11_nolog", "path": "/fixtures/facetable.json?_size=5", "connections": 8, "procs": 2, "requests": 466, "elapsed_s": 6.031, "rps": 77.3, "lat_us": {"mean": 104710.0, "p50": 102273.5, "p90": 121315.1, "p99": 148655.1, "p99.9": 169970.9, "max": 169970.9}, "status": {"200": 466}, "avg_body_bytes": 1251, "errors": 0, "requests_total": 542, "cpu_us_per_req": 16014.8, "main_cpu_us_per_req": 5941.0, "variant": "h11_nolog", "endpoint": "facetable", "round": 1, "kind": "tput", "ts": 1791853806.7508473} +{"label": "httptools", "path": "/fixtures/facetable.json?_size=5", "connections": 8, "procs": 2, "requests": 470, "elapsed_s": 6.054, "rps": 77.6, "lat_us": {"mean": 103746.6, "p50": 102043.6, "p90": 126512.6, "p99": 152102.5, "p99.9": 165186.6, "max": 165186.6}, "status": {"200": 470}, "avg_body_bytes": 1251, "errors": 0, "requests_total": 541, "cpu_us_per_req": 15951.9, "main_cpu_us_per_req": 6007.4, "variant": "httptools", "endpoint": "facetable", "round": 1, "kind": "tput", "ts": 1791853813.981462} +{"label": "base", "path": "/fixtures/facetable.json?_size=5", "connections": 8, "procs": 2, "requests": 479, "elapsed_s": 6.059, "rps": 79.1, "lat_us": {"mean": 101992.6, "p50": 100510.3, "p90": 118534.7, "p99": 135910.3, "p99.9": 169041.9, "max": 169041.9}, "status": {"200": 479}, "avg_body_bytes": 1251, "errors": 0, "requests_total": 559, "cpu_us_per_req": 15653.0, "main_cpu_us_per_req": 6010.7, "variant": "base", "endpoint": "facetable", "round": 1, "kind": "tput", "ts": 1791853821.2010021} +{"label": "base", "path": "/-/actor.json", "connections": 8, "procs": 2, "requests": 9140, "elapsed_s": 6.008, "rps": 1521.3, "lat_us": {"mean": 5254.6, "p50": 4915.0, "p90": 6500.6, "p99": 8453.6, "p99.9": 11285.5, "max": 43788.6}, "status": {"200": 9140}, "avg_body_bytes": 37, "errors": 0, "requests_total": 10622, "cpu_us_per_req": 650.5, "main_cpu_us_per_req": 649.6, "variant": "base", "endpoint": "actor", "round": 2, "kind": "tput", "ts": 1791853828.384974} +{"label": "httptools", "path": "/-/actor.json", "connections": 8, "procs": 2, "requests": 11722, "elapsed_s": 6.003, "rps": 1952.7, "lat_us": {"mean": 4093.1, "p50": 3604.0, "p90": 5356.0, "p99": 9478.3, "p99.9": 30008.0, "max": 39220.3}, "status": {"200": 11722}, "avg_body_bytes": 37, "errors": 0, "requests_total": 13516, "cpu_us_per_req": 503.8, "main_cpu_us_per_req": 502.4, "variant": "httptools", "endpoint": "actor", "round": 2, "kind": "tput", "ts": 1791853835.576631} +{"label": "h11_nolog", "path": "/-/actor.json", "connections": 8, "procs": 2, "requests": 10497, "elapsed_s": 6.003, "rps": 1748.5, "lat_us": {"mean": 4573.0, "p50": 4189.4, "p90": 5879.4, "p99": 8393.1, "p99.9": 18316.8, "max": 51314.2}, "status": {"200": 10497}, "avg_body_bytes": 37, "errors": 0, "requests_total": 12043, "cpu_us_per_req": 573.8, "main_cpu_us_per_req": 572.1, "variant": "h11_nolog", "endpoint": "actor", "round": 2, "kind": "tput", "ts": 1791853842.776228} +{"label": "patched", "path": "/-/actor.json", "connections": 8, "procs": 2, "requests": 11737, "elapsed_s": 6.005, "rps": 1954.5, "lat_us": {"mean": 4089.4, "p50": 3898.7, "p90": 4696.6, "p99": 6265.5, "p99.9": 13852.3, "max": 16439.4}, "status": {"200": 11737}, "avg_body_bytes": 37, "errors": 0, "requests_total": 13691, "cpu_us_per_req": 505.4, "main_cpu_us_per_req": 504.7, "variant": "patched", "endpoint": "actor", "round": 2, "kind": "tput", "ts": 1791853849.992616} +{"label": "patched_httptools", "path": "/-/actor.json", "connections": 8, "procs": 2, "requests": 18570, "elapsed_s": 6.003, "rps": 3093.6, "lat_us": {"mean": 2583.3, "p50": 2420.4, "p90": 3299.9, "p99": 4068.6, "p99.9": 8541.6, "max": 12130.9}, "status": {"200": 18570}, "avg_body_bytes": 37, "errors": 0, "requests_total": 21758, "cpu_us_per_req": 319.9, "main_cpu_us_per_req": 319.4, "variant": "patched_httptools", "endpoint": "actor", "round": 2, "kind": "tput", "ts": 1791853857.1825373} +{"label": "patched_best", "path": "/-/actor.json", "connections": 8, "procs": 2, "requests": 24645, "elapsed_s": 6.002, "rps": 4106.4, "lat_us": {"mean": 1945.6, "p50": 1780.4, "p90": 2519.4, "p99": 4050.6, "p99.9": 7416.5, "max": 9796.4}, "status": {"200": 24645}, "avg_body_bytes": 37, "errors": 0, "requests_total": 28874, "cpu_us_per_req": 238.3, "main_cpu_us_per_req": 238.3, "variant": "patched_best", "endpoint": "actor", "round": 2, "kind": "tput", "ts": 1791853864.3613117} +{"label": "base", "path": "/-/versions.json", "connections": 8, "procs": 2, "requests": 2478, "elapsed_s": 6.014, "rps": 412.0, "lat_us": {"mean": 19426.8, "p50": 18012.6, "p90": 25169.6, "p99": 35195.4, "p99.9": 71880.0, "max": 76085.2}, "status": {"200": 2478}, "avg_body_bytes": 1423, "errors": 0, "requests_total": 2860, "cpu_us_per_req": 2944.1, "main_cpu_us_per_req": 2111.9, "variant": "base", "endpoint": "versions", "round": 2, "kind": "tput", "ts": 1791853871.5683959} +{"label": "httptools", "path": "/-/versions.json", "connections": 8, "procs": 2, "requests": 2712, "elapsed_s": 6.011, "rps": 451.2, "lat_us": {"mean": 17732.8, "p50": 16678.1, "p90": 22272.3, "p99": 29884.3, "p99.9": 78709.1, "max": 107090.6}, "status": {"200": 2712}, "avg_body_bytes": 1423, "errors": 0, "requests_total": 3097, "cpu_us_per_req": 2728.4, "main_cpu_us_per_req": 1924.4, "variant": "httptools", "endpoint": "versions", "round": 2, "kind": "tput", "ts": 1791853878.7479758} +{"label": "h11_nolog", "path": "/-/versions.json", "connections": 8, "procs": 2, "requests": 2594, "elapsed_s": 6.012, "rps": 431.4, "lat_us": {"mean": 18554.9, "p50": 17445.8, "p90": 23019.5, "p99": 32708.4, "p99.9": 74209.5, "max": 77359.7}, "status": {"200": 2594}, "avg_body_bytes": 1423, "errors": 0, "requests_total": 3048, "cpu_us_per_req": 2785.4, "main_cpu_us_per_req": 1975.1, "variant": "h11_nolog", "endpoint": "versions", "round": 2, "kind": "tput", "ts": 1791853885.9242702} +{"label": "patched", "path": "/-/versions.json", "connections": 8, "procs": 2, "requests": 4398, "elapsed_s": 6.008, "rps": 732.0, "lat_us": {"mean": 10932.4, "p50": 10449.3, "p90": 14401.1, "p99": 20052.9, "p99.9": 26362.5, "max": 34920.1}, "status": {"200": 4398}, "avg_body_bytes": 1423, "errors": 0, "requests_total": 5092, "cpu_us_per_req": 1472.9, "main_cpu_us_per_req": 1046.7, "variant": "patched", "endpoint": "versions", "round": 2, "kind": "tput", "ts": 1791853893.152309} +{"label": "patched_httptools", "path": "/-/versions.json", "connections": 8, "procs": 2, "requests": 4985, "elapsed_s": 6.007, "rps": 829.8, "lat_us": {"mean": 9640.8, "p50": 9207.0, "p90": 12982.5, "p99": 17934.5, "p99.9": 24978.9, "max": 42133.9}, "status": {"200": 4985}, "avg_body_bytes": 1423, "errors": 0, "requests_total": 5698, "cpu_us_per_req": 1323.3, "main_cpu_us_per_req": 872.2, "variant": "patched_httptools", "endpoint": "versions", "round": 2, "kind": "tput", "ts": 1791853900.3329883} +{"label": "patched_best", "path": "/-/versions.json", "connections": 8, "procs": 2, "requests": 5930, "elapsed_s": 6.008, "rps": 987.0, "lat_us": {"mean": 8105.6, "p50": 7675.6, "p90": 10808.4, "p99": 15315.0, "p99.9": 52299.9, "max": 57777.2}, "status": {"200": 5930}, "avg_body_bytes": 1423, "errors": 0, "requests_total": 6841, "cpu_us_per_req": 1128.5, "main_cpu_us_per_req": 722.1, "variant": "patched_best", "endpoint": "versions", "round": 2, "kind": "tput", "ts": 1791853907.5198758} +{"label": "base", "path": "/-/static/app.css", "connections": 8, "procs": 2, "requests": 994, "elapsed_s": 6.023, "rps": 165.0, "lat_us": {"mean": 48698.2, "p50": 48252.3, "p90": 57559.3, "p99": 68885.6, "p99.9": 74171.3, "max": 76428.2}, "status": {"200": 994}, "avg_body_bytes": 83458, "errors": 0, "requests_total": 1147, "cpu_us_per_req": 7044.5, "main_cpu_us_per_req": 4821.3, "variant": "base", "endpoint": "static_css", "round": 2, "kind": "tput", "ts": 1791853914.7272303} +{"label": "httptools", "path": "/-/static/app.css", "connections": 8, "procs": 2, "requests": 1051, "elapsed_s": 6.032, "rps": 174.2, "lat_us": {"mean": 46002.7, "p50": 45353.2, "p90": 54635.8, "p99": 69174.9, "p99.9": 75186.8, "max": 75344.3}, "status": {"200": 1051}, "avg_body_bytes": 83458, "errors": 0, "requests_total": 1243, "cpu_us_per_req": 6476.3, "main_cpu_us_per_req": 4191.5, "variant": "httptools", "endpoint": "static_css", "round": 2, "kind": "tput", "ts": 1791853921.9314628} +{"label": "h11_nolog", "path": "/-/static/app.css", "connections": 8, "procs": 2, "requests": 860, "elapsed_s": 6.052, "rps": 142.1, "lat_us": {"mean": 56359.3, "p50": 53483.6, "p90": 69829.2, "p99": 87539.0, "p99.9": 107251.5, "max": 108415.1}, "status": {"200": 860}, "avg_body_bytes": 83458, "errors": 0, "requests_total": 1025, "cpu_us_per_req": 7492.7, "main_cpu_us_per_req": 4965.9, "variant": "h11_nolog", "endpoint": "static_css", "round": 2, "kind": "tput", "ts": 1791853929.1781409} +{"label": "patched", "path": "/-/static/app.css", "connections": 8, "procs": 2, "requests": 9919, "elapsed_s": 6.003, "rps": 1652.4, "lat_us": {"mean": 4838.5, "p50": 4411.0, "p90": 6326.2, "p99": 7680.6, "p99.9": 13226.9, "max": 22496.4}, "status": {"200": 9919}, "avg_body_bytes": 83458, "errors": 0, "requests_total": 11496, "cpu_us_per_req": 603.7, "main_cpu_us_per_req": 604.6, "variant": "patched", "endpoint": "static_css", "round": 2, "kind": "tput", "ts": 1791853936.3733284} +{"label": "patched_httptools", "path": "/-/static/app.css", "connections": 8, "procs": 2, "requests": 13761, "elapsed_s": 6.003, "rps": 2292.3, "lat_us": {"mean": 3487.0, "p50": 3220.0, "p90": 4433.2, "p99": 6069.5, "p99.9": 11266.0, "max": 16245.9}, "status": {"200": 13761}, "avg_body_bytes": 83458, "errors": 0, "requests_total": 16116, "cpu_us_per_req": 426.9, "main_cpu_us_per_req": 426.9, "variant": "patched_httptools", "endpoint": "static_css", "round": 2, "kind": "tput", "ts": 1791853943.5486755} +{"label": "patched_best", "path": "/-/static/app.css", "connections": 8, "procs": 2, "requests": 18659, "elapsed_s": 6.003, "rps": 3108.1, "lat_us": {"mean": 2570.7, "p50": 2389.7, "p90": 3275.9, "p99": 4358.4, "p99.9": 6335.0, "max": 11008.8}, "status": {"200": 18659}, "avg_body_bytes": 83458, "errors": 0, "requests_total": 21284, "cpu_us_per_req": 327.0, "main_cpu_us_per_req": 327.0, "variant": "patched_best", "endpoint": "static_css", "round": 2, "kind": "tput", "ts": 1791853950.725842} +{"label": "base", "path": "/fixtures/facetable.json?_size=5", "connections": 8, "procs": 2, "requests": 453, "elapsed_s": 6.066, "rps": 74.7, "lat_us": {"mean": 107815.0, "p50": 106606.2, "p90": 126310.9, "p99": 142815.7, "p99.9": 155846.0, "max": 155846.0}, "status": {"200": 453}, "avg_body_bytes": 1251, "errors": 0, "requests_total": 525, "cpu_us_per_req": 16647.6, "main_cpu_us_per_req": 6342.9, "variant": "base", "endpoint": "facetable", "round": 2, "kind": "tput", "ts": 1791853957.97659} +{"label": "httptools", "path": "/fixtures/facetable.json?_size=5", "connections": 8, "procs": 2, "requests": 511, "elapsed_s": 6.043, "rps": 84.6, "lat_us": {"mean": 95386.4, "p50": 94407.2, "p90": 110003.3, "p99": 132957.2, "p99.9": 145633.3, "max": 159380.6}, "status": {"200": 511}, "avg_body_bytes": 1251, "errors": 0, "requests_total": 583, "cpu_us_per_req": 15145.8, "main_cpu_us_per_req": 5591.8, "variant": "httptools", "endpoint": "facetable", "round": 2, "kind": "tput", "ts": 1791853965.179574} +{"label": "h11_nolog", "path": "/fixtures/facetable.json?_size=5", "connections": 8, "procs": 2, "requests": 468, "elapsed_s": 6.053, "rps": 77.3, "lat_us": {"mean": 103794.6, "p50": 103400.9, "p90": 123016.8, "p99": 134824.4, "p99.9": 163945.4, "max": 163945.4}, "status": {"200": 468}, "avg_body_bytes": 1251, "errors": 0, "requests_total": 545, "cpu_us_per_req": 16220.2, "main_cpu_us_per_req": 6073.4, "variant": "h11_nolog", "endpoint": "facetable", "round": 2, "kind": "tput", "ts": 1791853972.4021392} +{"label": "patched", "path": "/fixtures/facetable.json?_size=5", "connections": 8, "procs": 2, "requests": 769, "elapsed_s": 6.034, "rps": 127.4, "lat_us": {"mean": 62919.0, "p50": 61554.0, "p90": 75170.8, "p99": 101107.7, "p99.9": 137065.8, "max": 144383.3}, "status": {"200": 769}, "avg_body_bytes": 1251, "errors": 0, "requests_total": 895, "cpu_us_per_req": 9441.3, "main_cpu_us_per_req": 4145.3, "variant": "patched", "endpoint": "facetable", "round": 2, "kind": "tput", "ts": 1791853979.6027746} +{"label": "patched_httptools", "path": "/fixtures/facetable.json?_size=5", "connections": 8, "procs": 2, "requests": 747, "elapsed_s": 6.016, "rps": 124.2, "lat_us": {"mean": 64695.1, "p50": 63015.9, "p90": 76521.5, "p99": 137308.4, "p99.9": 147650.5, "max": 148065.5}, "status": {"200": 747}, "avg_body_bytes": 1251, "errors": 0, "requests_total": 886, "cpu_us_per_req": 9514.7, "main_cpu_us_per_req": 4006.8, "variant": "patched_httptools", "endpoint": "facetable", "round": 2, "kind": "tput", "ts": 1791853986.8095934} +{"label": "patched_best", "path": "/fixtures/facetable.json?_size=5", "connections": 8, "procs": 2, "requests": 751, "elapsed_s": 6.036, "rps": 124.4, "lat_us": {"mean": 64516.8, "p50": 63498.0, "p90": 77841.0, "p99": 98492.7, "p99.9": 108073.6, "max": 109981.9}, "status": {"200": 751}, "avg_body_bytes": 1251, "errors": 0, "requests_total": 889, "cpu_us_per_req": 9370.1, "main_cpu_us_per_req": 3835.8, "variant": "patched_best", "endpoint": "facetable", "round": 2, "kind": "tput", "ts": 1791853994.0335102} +{"label": "patched_best", "path": "/-/actor.json", "connections": 8, "procs": 2, "requests": 25516, "elapsed_s": 6.002, "rps": 4251.5, "lat_us": {"mean": 1879.1, "p50": 1755.9, "p90": 2368.8, "p99": 3167.4, "p99.9": 5603.0, "max": 11367.7}, "status": {"200": 25516}, "avg_body_bytes": 37, "errors": 0, "requests_total": 29433, "cpu_us_per_req": 235.5, "main_cpu_us_per_req": 235.1, "variant": "patched_best", "endpoint": "actor", "round": 3, "kind": "tput", "ts": 1791854001.2289593} +{"label": "patched_httptools", "path": "/-/actor.json", "connections": 8, "procs": 2, "requests": 18207, "elapsed_s": 6.003, "rps": 3033.2, "lat_us": {"mean": 2634.5, "p50": 2465.9, "p90": 3353.8, "p99": 4055.8, "p99.9": 7227.9, "max": 14230.6}, "status": {"200": 18207}, "avg_body_bytes": 37, "errors": 0, "requests_total": 21194, "cpu_us_per_req": 327.0, "main_cpu_us_per_req": 326.5, "variant": "patched_httptools", "endpoint": "actor", "round": 3, "kind": "tput", "ts": 1791854008.3998716} +{"label": "patched", "path": "/-/actor.json", "connections": 8, "procs": 2, "requests": 11770, "elapsed_s": 6.004, "rps": 1960.5, "lat_us": {"mean": 4077.5, "p50": 3857.3, "p90": 4775.6, "p99": 6335.7, "p99.9": 14395.4, "max": 47019.9}, "status": {"200": 11770}, "avg_body_bytes": 37, "errors": 0, "requests_total": 13847, "cpu_us_per_req": 499.0, "main_cpu_us_per_req": 498.3, "variant": "patched", "endpoint": "actor", "round": 3, "kind": "tput", "ts": 1791854015.5831237} +{"label": "h11_nolog", "path": "/-/actor.json", "connections": 8, "procs": 2, "requests": 10214, "elapsed_s": 6.004, "rps": 1701.3, "lat_us": {"mean": 4699.1, "p50": 4284.0, "p90": 6138.9, "p99": 8673.8, "p99.9": 13643.5, "max": 54664.6}, "status": {"200": 10214}, "avg_body_bytes": 37, "errors": 0, "requests_total": 11927, "cpu_us_per_req": 574.3, "main_cpu_us_per_req": 573.5, "variant": "h11_nolog", "endpoint": "actor", "round": 3, "kind": "tput", "ts": 1791854022.7493038} +{"label": "httptools", "path": "/-/actor.json", "connections": 8, "procs": 2, "requests": 13201, "elapsed_s": 6.003, "rps": 2199.1, "lat_us": {"mean": 3634.9, "p50": 3345.3, "p90": 4470.4, "p99": 6623.5, "p99.9": 9416.0, "max": 52881.9}, "status": {"200": 13201}, "avg_body_bytes": 37, "errors": 0, "requests_total": 15443, "cpu_us_per_req": 448.1, "main_cpu_us_per_req": 447.5, "variant": "httptools", "endpoint": "actor", "round": 3, "kind": "tput", "ts": 1791854029.9155543} +{"label": "base", "path": "/-/actor.json", "connections": 8, "procs": 2, "requests": 9335, "elapsed_s": 6.006, "rps": 1554.2, "lat_us": {"mean": 5143.2, "p50": 4811.1, "p90": 6138.2, "p99": 8418.5, "p99.9": 20617.2, "max": 45227.2}, "status": {"200": 9335}, "avg_body_bytes": 37, "errors": 0, "requests_total": 10892, "cpu_us_per_req": 636.2, "main_cpu_us_per_req": 633.5, "variant": "base", "endpoint": "actor", "round": 3, "kind": "tput", "ts": 1791854037.111041} +{"label": "patched_best", "path": "/-/versions.json", "connections": 8, "procs": 2, "requests": 5166, "elapsed_s": 6.007, "rps": 859.9, "lat_us": {"mean": 9303.2, "p50": 8881.8, "p90": 12490.2, "p99": 17449.9, "p99.9": 26297.4, "max": 30163.0}, "status": {"200": 5166}, "avg_body_bytes": 1423, "errors": 0, "requests_total": 6049, "cpu_us_per_req": 1261.4, "main_cpu_us_per_req": 805.1, "variant": "patched_best", "endpoint": "versions", "round": 3, "kind": "tput", "ts": 1791854044.3300989} +{"label": "patched_httptools", "path": "/-/versions.json", "connections": 8, "procs": 2, "requests": 4740, "elapsed_s": 6.008, "rps": 788.9, "lat_us": {"mean": 10149.1, "p50": 9619.8, "p90": 13643.5, "p99": 19650.2, "p99.9": 42240.1, "max": 45977.1}, "status": {"200": 4740}, "avg_body_bytes": 1423, "errors": 0, "requests_total": 5478, "cpu_us_per_req": 1374.6, "main_cpu_us_per_req": 907.3, "variant": "patched_httptools", "endpoint": "versions", "round": 3, "kind": "tput", "ts": 1791854051.5519679} +{"label": "patched", "path": "/-/versions.json", "connections": 8, "procs": 2, "requests": 4190, "elapsed_s": 6.009, "rps": 697.3, "lat_us": {"mean": 11473.7, "p50": 11061.1, "p90": 15084.7, "p99": 19763.7, "p99.9": 24989.2, "max": 41097.0}, "status": {"200": 4190}, "avg_body_bytes": 1423, "errors": 0, "requests_total": 4898, "cpu_us_per_req": 1539.4, "main_cpu_us_per_req": 1084.1, "variant": "patched", "endpoint": "versions", "round": 3, "kind": "tput", "ts": 1791854058.760448} +{"label": "h11_nolog", "path": "/-/versions.json", "connections": 8, "procs": 2, "requests": 2595, "elapsed_s": 6.008, "rps": 431.9, "lat_us": {"mean": 18542.7, "p50": 17566.4, "p90": 22490.4, "p99": 30203.9, "p99.9": 72462.3, "max": 78849.5}, "status": {"200": 2595}, "avg_body_bytes": 1423, "errors": 0, "requests_total": 2985, "cpu_us_per_req": 2911.2, "main_cpu_us_per_req": 1986.6, "variant": "h11_nolog", "endpoint": "versions", "round": 3, "kind": "tput", "ts": 1791854065.946989} +{"label": "httptools", "path": "/-/versions.json", "connections": 8, "procs": 2, "requests": 2681, "elapsed_s": 6.014, "rps": 445.8, "lat_us": {"mean": 17954.0, "p50": 16985.9, "p90": 22670.0, "p99": 29300.6, "p99.9": 58047.9, "max": 74179.1}, "status": {"200": 2681}, "avg_body_bytes": 1423, "errors": 0, "requests_total": 3111, "cpu_us_per_req": 2761.2, "main_cpu_us_per_req": 1931.9, "variant": "httptools", "endpoint": "versions", "round": 3, "kind": "tput", "ts": 1791854073.1916819} +{"label": "base", "path": "/-/versions.json", "connections": 8, "procs": 2, "requests": 2275, "elapsed_s": 6.022, "rps": 377.8, "lat_us": {"mean": 21175.1, "p50": 19408.2, "p90": 27064.0, "p99": 37232.5, "p99.9": 98254.3, "max": 99933.1}, "status": {"200": 2275}, "avg_body_bytes": 1423, "errors": 0, "requests_total": 2625, "cpu_us_per_req": 3192.4, "main_cpu_us_per_req": 2320.0, "variant": "base", "endpoint": "versions", "round": 3, "kind": "tput", "ts": 1791854080.4067428} +{"label": "patched_best", "path": "/-/static/app.css", "connections": 8, "procs": 2, "requests": 18715, "elapsed_s": 6.004, "rps": 3117.3, "lat_us": {"mean": 2562.6, "p50": 2367.7, "p90": 3348.4, "p99": 4627.4, "p99.9": 9878.1, "max": 189273.3}, "status": {"200": 18715}, "avg_body_bytes": 83458, "errors": 0, "requests_total": 21620, "cpu_us_per_req": 320.5, "main_cpu_us_per_req": 320.1, "variant": "patched_best", "endpoint": "static_css", "round": 3, "kind": "tput", "ts": 1791854087.5856516} +{"label": "patched_httptools", "path": "/-/static/app.css", "connections": 8, "procs": 2, "requests": 13408, "elapsed_s": 6.004, "rps": 2233.2, "lat_us": {"mean": 3578.7, "p50": 3284.4, "p90": 4674.0, "p99": 5744.1, "p99.9": 9932.8, "max": 26797.9}, "status": {"200": 13408}, "avg_body_bytes": 83458, "errors": 0, "requests_total": 15752, "cpu_us_per_req": 438.0, "main_cpu_us_per_req": 438.0, "variant": "patched_httptools", "endpoint": "static_css", "round": 3, "kind": "tput", "ts": 1791854094.7660844} +{"label": "patched", "path": "/-/static/app.css", "connections": 8, "procs": 2, "requests": 10197, "elapsed_s": 6.006, "rps": 1697.8, "lat_us": {"mean": 4707.0, "p50": 4361.6, "p90": 6164.9, "p99": 7882.4, "p99.9": 20780.4, "max": 35785.4}, "status": {"200": 10197}, "avg_body_bytes": 83458, "errors": 0, "requests_total": 11735, "cpu_us_per_req": 588.0, "main_cpu_us_per_req": 587.1, "variant": "patched", "endpoint": "static_css", "round": 3, "kind": "tput", "ts": 1791854101.9976592} +{"label": "h11_nolog", "path": "/-/static/app.css", "connections": 8, "procs": 2, "requests": 992, "elapsed_s": 6.018, "rps": 164.8, "lat_us": {"mean": 48736.7, "p50": 48288.0, "p90": 56526.0, "p99": 65104.7, "p99.9": 67692.9, "max": 69523.3}, "status": {"200": 992}, "avg_body_bytes": 83458, "errors": 0, "requests_total": 1168, "cpu_us_per_req": 6840.8, "main_cpu_us_per_req": 4614.7, "variant": "h11_nolog", "endpoint": "static_css", "round": 3, "kind": "tput", "ts": 1791854109.2050657} +{"label": "httptools", "path": "/-/static/app.css", "connections": 8, "procs": 2, "requests": 1130, "elapsed_s": 6.03, "rps": 187.4, "lat_us": {"mean": 42801.5, "p50": 42709.6, "p90": 49572.0, "p99": 60507.4, "p99.9": 92490.2, "max": 93525.8}, "status": {"200": 1130}, "avg_body_bytes": 83458, "errors": 0, "requests_total": 1322, "cpu_us_per_req": 6164.9, "main_cpu_us_per_req": 4077.2, "variant": "httptools", "endpoint": "static_css", "round": 3, "kind": "tput", "ts": 1791854116.4255795} +{"label": "base", "path": "/-/static/app.css", "connections": 8, "procs": 2, "requests": 999, "elapsed_s": 6.025, "rps": 165.8, "lat_us": {"mean": 48382.9, "p50": 48675.5, "p90": 55803.1, "p99": 60689.4, "p99.9": 64886.3, "max": 65026.8}, "status": {"200": 999}, "avg_body_bytes": 83458, "errors": 0, "requests_total": 1162, "cpu_us_per_req": 6953.5, "main_cpu_us_per_req": 4741.8, "variant": "base", "endpoint": "static_css", "round": 3, "kind": "tput", "ts": 1791854123.6358073} +{"label": "patched_best", "path": "/fixtures/facetable.json?_size=5", "connections": 8, "procs": 2, "requests": 810, "elapsed_s": 6.021, "rps": 134.5, "lat_us": {"mean": 59663.2, "p50": 58946.0, "p90": 70980.7, "p99": 98340.9, "p99.9": 120646.6, "max": 125505.9}, "status": {"200": 810}, "avg_body_bytes": 1251, "errors": 0, "requests_total": 951, "cpu_us_per_req": 8980.0, "main_cpu_us_per_req": 3564.7, "variant": "patched_best", "endpoint": "facetable", "round": 3, "kind": "tput", "ts": 1791854130.8072963} +{"label": "patched_httptools", "path": "/fixtures/facetable.json?_size=5", "connections": 8, "procs": 2, "requests": 698, "elapsed_s": 6.027, "rps": 115.8, "lat_us": {"mean": 69442.9, "p50": 68697.7, "p90": 83456.3, "p99": 97823.5, "p99.9": 107563.5, "max": 118536.9}, "status": {"200": 698}, "avg_body_bytes": 1251, "errors": 0, "requests_total": 829, "cpu_us_per_req": 9903.5, "main_cpu_us_per_req": 4149.6, "variant": "patched_httptools", "endpoint": "facetable", "round": 3, "kind": "tput", "ts": 1791854138.0258324} +{"label": "patched", "path": "/fixtures/facetable.json?_size=5", "connections": 8, "procs": 2, "requests": 768, "elapsed_s": 6.032, "rps": 127.3, "lat_us": {"mean": 63012.0, "p50": 62474.3, "p90": 74476.5, "p99": 86359.5, "p99.9": 93859.5, "max": 96024.2}, "status": {"200": 768}, "avg_body_bytes": 1251, "errors": 0, "requests_total": 896, "cpu_us_per_req": 9486.6, "main_cpu_us_per_req": 4107.1, "variant": "patched", "endpoint": "facetable", "round": 3, "kind": "tput", "ts": 1791854145.2324595} +{"label": "h11_nolog", "path": "/fixtures/facetable.json?_size=5", "connections": 8, "procs": 2, "requests": 468, "elapsed_s": 6.044, "rps": 77.4, "lat_us": {"mean": 103818.4, "p50": 103478.9, "p90": 119651.2, "p99": 136469.4, "p99.9": 161739.5, "max": 161739.5}, "status": {"200": 468}, "avg_body_bytes": 1251, "errors": 0, "requests_total": 543, "cpu_us_per_req": 16132.6, "main_cpu_us_per_req": 6040.5, "variant": "h11_nolog", "endpoint": "facetable", "round": 3, "kind": "tput", "ts": 1791854152.459264} +{"label": "httptools", "path": "/fixtures/facetable.json?_size=5", "connections": 8, "procs": 2, "requests": 468, "elapsed_s": 6.046, "rps": 77.4, "lat_us": {"mean": 104193.5, "p50": 103586.5, "p90": 119463.1, "p99": 148073.8, "p99.9": 166157.3, "max": 166157.3}, "status": {"200": 468}, "avg_body_bytes": 1251, "errors": 0, "requests_total": 547, "cpu_us_per_req": 16124.3, "main_cpu_us_per_req": 5959.8, "variant": "httptools", "endpoint": "facetable", "round": 3, "kind": "tput", "ts": 1791854159.6680353} +{"label": "base", "path": "/fixtures/facetable.json?_size=5", "connections": 8, "procs": 2, "requests": 453, "elapsed_s": 6.06, "rps": 74.8, "lat_us": {"mean": 107519.6, "p50": 105671.1, "p90": 126894.6, "p99": 151065.2, "p99.9": 175113.1, "max": 175113.1}, "status": {"200": 453}, "avg_body_bytes": 1251, "errors": 0, "requests_total": 528, "cpu_us_per_req": 16590.9, "main_cpu_us_per_req": 6363.6, "variant": "base", "endpoint": "facetable", "round": 3, "kind": "tput", "ts": 1791854166.9108534} +{"label": "base", "path": "/-/actor.json", "connections": 8, "procs": 2, "requests": 8795, "elapsed_s": 6.004, "rps": 1464.9, "lat_us": {"mean": 5458.0, "p50": 4873.3, "p90": 7245.7, "p99": 9307.0, "p99.9": 14658.9, "max": 59216.4}, "status": {"200": 8795}, "avg_body_bytes": 37, "errors": 0, "requests_total": 10378, "cpu_us_per_req": 667.8, "main_cpu_us_per_req": 666.8, "variant": "base", "endpoint": "actor", "round": 4, "kind": "tput", "ts": 1791854174.0945053} +{"label": "httptools", "path": "/-/actor.json", "connections": 8, "procs": 2, "requests": 12932, "elapsed_s": 6.003, "rps": 2154.4, "lat_us": {"mean": 3711.0, "p50": 3326.8, "p90": 4733.7, "p99": 6507.1, "p99.9": 25543.7, "max": 54912.7}, "status": {"200": 12932}, "avg_body_bytes": 37, "errors": 0, "requests_total": 14929, "cpu_us_per_req": 464.2, "main_cpu_us_per_req": 462.2, "variant": "httptools", "endpoint": "actor", "round": 4, "kind": "tput", "ts": 1791854181.2754939} +{"label": "h11_nolog", "path": "/-/actor.json", "connections": 8, "procs": 2, "requests": 11048, "elapsed_s": 6.008, "rps": 1838.9, "lat_us": {"mean": 4346.6, "p50": 3976.3, "p90": 5354.2, "p99": 8303.3, "p99.9": 17252.8, "max": 35145.6}, "status": {"200": 11048}, "avg_body_bytes": 37, "errors": 0, "requests_total": 12848, "cpu_us_per_req": 542.5, "main_cpu_us_per_req": 540.9, "variant": "h11_nolog", "endpoint": "actor", "round": 4, "kind": "tput", "ts": 1791854188.4547238} +{"label": "patched", "path": "/-/actor.json", "connections": 8, "procs": 2, "requests": 11626, "elapsed_s": 6.003, "rps": 1936.7, "lat_us": {"mean": 4127.5, "p50": 3877.0, "p90": 5048.0, "p99": 6569.2, "p99.9": 9026.0, "max": 14418.5}, "status": {"200": 11626}, "avg_body_bytes": 37, "errors": 0, "requests_total": 13402, "cpu_us_per_req": 517.1, "main_cpu_us_per_req": 516.3, "variant": "patched", "endpoint": "actor", "round": 4, "kind": "tput", "ts": 1791854195.605941} +{"label": "patched_httptools", "path": "/-/actor.json", "connections": 8, "procs": 2, "requests": 18323, "elapsed_s": 6.002, "rps": 3052.8, "lat_us": {"mean": 2617.5, "p50": 2429.9, "p90": 3287.1, "p99": 4415.0, "p99.9": 5989.3, "max": 12749.3}, "status": {"200": 18323}, "avg_body_bytes": 37, "errors": 0, "requests_total": 21408, "cpu_us_per_req": 324.2, "main_cpu_us_per_req": 324.2, "variant": "patched_httptools", "endpoint": "actor", "round": 4, "kind": "tput", "ts": 1791854202.8151617} +{"label": "patched_best", "path": "/-/actor.json", "connections": 8, "procs": 2, "requests": 26541, "elapsed_s": 6.009, "rps": 4416.9, "lat_us": {"mean": 1807.9, "p50": 1717.1, "p90": 2057.1, "p99": 3338.7, "p99.9": 7094.3, "max": 17901.1}, "status": {"200": 26541}, "avg_body_bytes": 37, "errors": 0, "requests_total": 31043, "cpu_us_per_req": 223.2, "main_cpu_us_per_req": 222.9, "variant": "patched_best", "endpoint": "actor", "round": 4, "kind": "tput", "ts": 1791854210.0262132} +{"label": "base", "path": "/-/versions.json", "connections": 8, "procs": 2, "requests": 2312, "elapsed_s": 6.013, "rps": 384.5, "lat_us": {"mean": 20811.2, "p50": 19337.8, "p90": 26252.7, "p99": 38038.5, "p99.9": 78457.7, "max": 103671.6}, "status": {"200": 2312}, "avg_body_bytes": 1423, "errors": 0, "requests_total": 2742, "cpu_us_per_req": 3034.3, "main_cpu_us_per_req": 2199.1, "variant": "base", "endpoint": "versions", "round": 4, "kind": "tput", "ts": 1791854217.2051256} +{"label": "httptools", "path": "/-/versions.json", "connections": 8, "procs": 2, "requests": 2630, "elapsed_s": 6.012, "rps": 437.5, "lat_us": {"mean": 18316.4, "p50": 17248.9, "p90": 23001.6, "p99": 32141.5, "p99.9": 66170.9, "max": 80149.7}, "status": {"200": 2630}, "avg_body_bytes": 1423, "errors": 0, "requests_total": 3045, "cpu_us_per_req": 2801.3, "main_cpu_us_per_req": 1963.9, "variant": "httptools", "endpoint": "versions", "round": 4, "kind": "tput", "ts": 1791854224.381843} +{"label": "h11_nolog", "path": "/-/versions.json", "connections": 8, "procs": 2, "requests": 2609, "elapsed_s": 6.01, "rps": 434.1, "lat_us": {"mean": 18429.5, "p50": 17348.1, "p90": 22805.5, "p99": 29060.8, "p99.9": 86343.2, "max": 89616.2}, "status": {"200": 2609}, "avg_body_bytes": 1423, "errors": 0, "requests_total": 3005, "cpu_us_per_req": 2825.3, "main_cpu_us_per_req": 2003.3, "variant": "h11_nolog", "endpoint": "versions", "round": 4, "kind": "tput", "ts": 1791854231.5537577} +{"label": "patched", "path": "/-/versions.json", "connections": 8, "procs": 2, "requests": 4241, "elapsed_s": 6.006, "rps": 706.1, "lat_us": {"mean": 11328.8, "p50": 10714.4, "p90": 14903.2, "p99": 25329.6, "p99.9": 43344.6, "max": 44690.0}, "status": {"200": 4241}, "avg_body_bytes": 1423, "errors": 0, "requests_total": 4954, "cpu_us_per_req": 1507.9, "main_cpu_us_per_req": 1067.8, "variant": "patched", "endpoint": "versions", "round": 4, "kind": "tput", "ts": 1791854238.7336624} +{"label": "patched_httptools", "path": "/-/versions.json", "connections": 8, "procs": 2, "requests": 5087, "elapsed_s": 6.005, "rps": 847.2, "lat_us": {"mean": 9439.9, "p50": 9031.7, "p90": 12607.4, "p99": 17379.2, "p99.9": 26763.2, "max": 28600.4}, "status": {"200": 5087}, "avg_body_bytes": 1423, "errors": 0, "requests_total": 5866, "cpu_us_per_req": 1304.1, "main_cpu_us_per_req": 855.8, "variant": "patched_httptools", "endpoint": "versions", "round": 4, "kind": "tput", "ts": 1791854245.911422} +{"label": "patched_best", "path": "/-/versions.json", "connections": 8, "procs": 2, "requests": 5833, "elapsed_s": 6.004, "rps": 971.5, "lat_us": {"mean": 8230.8, "p50": 7957.2, "p90": 10949.1, "p99": 15172.4, "p99.9": 20748.9, "max": 32158.6}, "status": {"200": 5833}, "avg_body_bytes": 1423, "errors": 0, "requests_total": 6743, "cpu_us_per_req": 1156.8, "main_cpu_us_per_req": 731.1, "variant": "patched_best", "endpoint": "versions", "round": 4, "kind": "tput", "ts": 1791854253.0885887} +{"label": "base", "path": "/-/static/app.css", "connections": 8, "procs": 2, "requests": 971, "elapsed_s": 6.028, "rps": 161.1, "lat_us": {"mean": 49756.6, "p50": 48306.0, "p90": 60592.2, "p99": 81975.1, "p99.9": 116679.1, "max": 117780.2}, "status": {"200": 971}, "avg_body_bytes": 83458, "errors": 0, "requests_total": 1128, "cpu_us_per_req": 7056.7, "main_cpu_us_per_req": 4858.2, "variant": "base", "endpoint": "static_css", "round": 4, "kind": "tput", "ts": 1791854260.287365} +{"label": "httptools", "path": "/-/static/app.css", "connections": 8, "procs": 2, "requests": 1219, "elapsed_s": 6.031, "rps": 202.1, "lat_us": {"mean": 39674.2, "p50": 39264.6, "p90": 47687.3, "p99": 55586.4, "p99.9": 59145.7, "max": 60509.6}, "status": {"200": 1219}, "avg_body_bytes": 83458, "errors": 0, "requests_total": 1389, "cpu_us_per_req": 5896.3, "main_cpu_us_per_req": 3887.7, "variant": "httptools", "endpoint": "static_css", "round": 4, "kind": "tput", "ts": 1791854267.4873145} +{"label": "h11_nolog", "path": "/-/static/app.css", "connections": 8, "procs": 2, "requests": 1040, "elapsed_s": 6.031, "rps": 172.4, "lat_us": {"mean": 46445.5, "p50": 46874.4, "p90": 54136.0, "p99": 60330.1, "p99.9": 61616.1, "max": 61850.8}, "status": {"200": 1040}, "avg_body_bytes": 83458, "errors": 0, "requests_total": 1215, "cpu_us_per_req": 6707.8, "main_cpu_us_per_req": 4551.4, "variant": "h11_nolog", "endpoint": "static_css", "round": 4, "kind": "tput", "ts": 1791854274.676909} +{"label": "patched", "path": "/-/static/app.css", "connections": 8, "procs": 2, "requests": 10694, "elapsed_s": 6.004, "rps": 1781.2, "lat_us": {"mean": 4488.4, "p50": 4203.6, "p90": 5594.2, "p99": 7411.9, "p99.9": 14184.2, "max": 21553.5}, "status": {"200": 10694}, "avg_body_bytes": 83458, "errors": 0, "requests_total": 12528, "cpu_us_per_req": 550.8, "main_cpu_us_per_req": 550.8, "variant": "patched", "endpoint": "static_css", "round": 4, "kind": "tput", "ts": 1791854281.840093} +{"label": "patched_httptools", "path": "/-/static/app.css", "connections": 8, "procs": 2, "requests": 14279, "elapsed_s": 6.003, "rps": 2378.7, "lat_us": {"mean": 3359.9, "p50": 3142.3, "p90": 4182.6, "p99": 5651.3, "p99.9": 13197.8, "max": 22589.7}, "status": {"200": 14279}, "avg_body_bytes": 83458, "errors": 0, "requests_total": 16722, "cpu_us_per_req": 412.0, "main_cpu_us_per_req": 410.8, "variant": "patched_httptools", "endpoint": "static_css", "round": 4, "kind": "tput", "ts": 1791854289.0347748} +{"label": "patched_best", "path": "/-/static/app.css", "connections": 8, "procs": 2, "requests": 18834, "elapsed_s": 6.003, "rps": 3137.6, "lat_us": {"mean": 2546.6, "p50": 2416.9, "p90": 2977.3, "p99": 4210.4, "p99.9": 7452.8, "max": 8947.2}, "status": {"200": 18834}, "avg_body_bytes": 83458, "errors": 0, "requests_total": 22070, "cpu_us_per_req": 313.1, "main_cpu_us_per_req": 313.1, "variant": "patched_best", "endpoint": "static_css", "round": 4, "kind": "tput", "ts": 1791854296.2119744} +{"label": "base", "path": "/fixtures/facetable.json?_size=5", "connections": 8, "procs": 2, "requests": 499, "elapsed_s": 6.043, "rps": 82.6, "lat_us": {"mean": 97525.7, "p50": 96061.1, "p90": 112487.7, "p99": 133423.5, "p99.9": 169521.2, "max": 169521.2}, "status": {"200": 499}, "avg_body_bytes": 1251, "errors": 0, "requests_total": 571, "cpu_us_per_req": 15621.7, "main_cpu_us_per_req": 5972.0, "variant": "base", "endpoint": "facetable", "round": 4, "kind": "tput", "ts": 1791854303.4308567} +{"label": "httptools", "path": "/fixtures/facetable.json?_size=5", "connections": 8, "procs": 2, "requests": 489, "elapsed_s": 6.047, "rps": 80.9, "lat_us": {"mean": 99383.9, "p50": 98295.2, "p90": 114852.9, "p99": 129301.6, "p99.9": 160185.7, "max": 160185.7}, "status": {"200": 489}, "avg_body_bytes": 1251, "errors": 0, "requests_total": 572, "cpu_us_per_req": 15542.0, "main_cpu_us_per_req": 5804.2, "variant": "httptools", "endpoint": "facetable", "round": 4, "kind": "tput", "ts": 1791854310.645577} +{"label": "h11_nolog", "path": "/fixtures/facetable.json?_size=5", "connections": 8, "procs": 2, "requests": 436, "elapsed_s": 6.055, "rps": 72.0, "lat_us": {"mean": 111973.4, "p50": 109542.6, "p90": 133295.7, "p99": 176113.2, "p99.9": 264098.0, "max": 264098.0}, "status": {"200": 436}, "avg_body_bytes": 1251, "errors": 0, "requests_total": 507, "cpu_us_per_req": 17120.3, "main_cpu_us_per_req": 6331.4, "variant": "h11_nolog", "endpoint": "facetable", "round": 4, "kind": "tput", "ts": 1791854317.8592942} +{"label": "patched", "path": "/fixtures/facetable.json?_size=5", "connections": 8, "procs": 2, "requests": 800, "elapsed_s": 6.034, "rps": 132.6, "lat_us": {"mean": 60593.1, "p50": 58995.6, "p90": 73792.0, "p99": 95871.3, "p99.9": 131799.8, "max": 147994.9}, "status": {"200": 800}, "avg_body_bytes": 1251, "errors": 0, "requests_total": 931, "cpu_us_per_req": 9044.0, "main_cpu_us_per_req": 3942.0, "variant": "patched", "endpoint": "facetable", "round": 4, "kind": "tput", "ts": 1791854325.0460005} +{"label": "patched_httptools", "path": "/fixtures/facetable.json?_size=5", "connections": 8, "procs": 2, "requests": 892, "elapsed_s": 6.031, "rps": 147.9, "lat_us": {"mean": 54177.0, "p50": 53234.2, "p90": 64683.0, "p99": 77470.3, "p99.9": 87425.5, "max": 90415.1}, "status": {"200": 892}, "avg_body_bytes": 1251, "errors": 0, "requests_total": 1029, "cpu_us_per_req": 8493.7, "main_cpu_us_per_req": 3401.4, "variant": "patched_httptools", "endpoint": "facetable", "round": 4, "kind": "tput", "ts": 1791854332.2237089} +{"label": "patched_best", "path": "/fixtures/facetable.json?_size=5", "connections": 8, "procs": 2, "requests": 918, "elapsed_s": 6.035, "rps": 152.1, "lat_us": {"mean": 52779.3, "p50": 51916.1, "p90": 64044.3, "p99": 73402.8, "p99.9": 82703.9, "max": 87907.4}, "status": {"200": 918}, "avg_body_bytes": 1251, "errors": 0, "requests_total": 1069, "cpu_us_per_req": 8101.0, "main_cpu_us_per_req": 3283.4, "variant": "patched_best", "endpoint": "facetable", "round": 4, "kind": "tput", "ts": 1791854339.4123988} diff --git a/perf/request-response/tools/e2e_bench.py b/perf/request-response/tools/e2e_bench.py new file mode 100644 index 00000000..549a1eef --- /dev/null +++ b/perf/request-response/tools/e2e_bench.py @@ -0,0 +1,369 @@ +""" +Orchestrate end-to-end A/B runs against several `datasette serve` variants. + +Set E2E_BASE_TREE and E2E_PATCHED_TREE to the two source trees, and +E2E_HTTPTOOLS_PYTHON to a venv's python that has httptools installed. +The report used: base, httptools, h11_nolog, patched, patched_httptools, +patched_best. + + python e2e_bench.py start # start all variant servers (pids in server_PORT.pid) + python e2e_bench.py stop # kill them + python e2e_bench.py tput --rounds 3 --variants a,b --endpoints x,y --conns 8 --secs 8 + python e2e_bench.py lat --rounds 3 ... (1 connection) + +Results are appended as JSON lines to final_results_.jsonl and a median +summary is printed. +""" + +import argparse +import json +import os +import signal +import statistics +import subprocess +import sys +import time +import urllib.request + +HERE = os.path.dirname(os.path.abspath(__file__)) +# fixtures.db is created by bench_asgi.py on its first run +FIXTURES = os.path.join(HERE, "fixtures.db") +# Python with datasette's dependencies but no httptools (uvicorn falls back to h11) +SHARED_PY = os.environ.get("E2E_PYTHON", sys.executable) +# Python in a second venv that also has httptools (and uvloop) installed +SCRATCH_PY = os.environ.get("E2E_HTTPTOOLS_PYTHON", SHARED_PY) +LOADGEN_PY = SHARED_PY +# Source trees: cf113a5, and cf113a5 with patches/ALL-combined.diff applied +BASE_TREE = os.environ.get("E2E_BASE_TREE", "") +PATCHED = os.environ.get("E2E_PATCHED_TREE", "") +SERVE_ARGS = [FIXTURES, "--setting", "num_sql_threads", "3", "--secret", "yoursecret"] + +# name: (port, python, use serve_variant.py?, env) +VARIANTS = { + # plain `python -m datasette serve` from the shared venv: h11 + asyncio + access log + "base": (8873, SHARED_PY, False, {"PYTHONPATH": BASE_TREE}), + # scratch venv (httptools+uvloop installed) forced back to h11: A/A control for base + "h11": (8874, SCRATCH_PY, True, {"E2E_HTTP": "h11"}), + # plain `datasette serve` in the scratch venv: uvicorn http=auto picks httptools + "httptools": (8875, SCRATCH_PY, False, {"PYTHONPATH": BASE_TREE}), + "h11_nolog": ( + 8876, + SCRATCH_PY, + True, + {"E2E_HTTP": "h11", "E2E_ACCESS_LOG": "0", "PYTHONPATH": BASE_TREE}, + ), + "httptools_nolog": ( + 8877, + SCRATCH_PY, + True, + {"E2E_HTTP": "httptools", "E2E_ACCESS_LOG": "0"}, + ), + "h11_cl": (8879, SCRATCH_PY, True, {"E2E_HTTP": "h11", "E2E_CONTENT_LENGTH": "1"}), + "h11_coalesce": (8880, SCRATCH_PY, True, {"E2E_HTTP": "h11", "E2E_COALESCE": "1"}), + "h11_gcfreeze": (8881, SCRATCH_PY, True, {"E2E_HTTP": "h11", "E2E_GC_FREEZE": "1"}), + "h11_uvloop": (8882, SCRATCH_PY, True, {"E2E_HTTP": "h11", "E2E_LOOP": "uvloop"}), + "h11_cl_coalesce": ( + 8883, + SCRATCH_PY, + True, + {"E2E_HTTP": "h11", "E2E_CONTENT_LENGTH": "1", "E2E_COALESCE": "1"}, + ), + "httptools_uvloop": ( + 8884, + SCRATCH_PY, + True, + {"E2E_HTTP": "httptools", "E2E_LOOP": "uvloop"}, + ), + "h11_static1m": ( + 8885, + SCRATCH_PY, + True, + {"E2E_HTTP": "h11", "E2E_STATIC_CHUNK": "1048576"}, + ), + "best": ( + 8886, + SCRATCH_PY, + True, + { + "E2E_HTTP": "httptools", + "E2E_ACCESS_LOG": "0", + "E2E_LOOP": "uvloop", + "E2E_CONTENT_LENGTH": "1", + "E2E_GC_FREEZE": "1", + "E2E_STATIC_CHUNK": "1048576", + }, + ), + "httptools_cl": ( + 8887, + SCRATCH_PY, + True, + {"E2E_HTTP": "httptools", "E2E_CONTENT_LENGTH": "1"}, + ), + "h11_switch500us": ( + 8888, + SCRATCH_PY, + True, + {"E2E_HTTP": "h11", "E2E_SWITCH": "0.0005"}, + ), + "h11_switch1ms": ( + 8889, + SCRATCH_PY, + True, + {"E2E_HTTP": "h11", "E2E_SWITCH": "0.001"}, + ), + # other agents' in-process patches (ds_patched/, see apply_patches.py), unchanged server stack + "patched": (8890, SHARED_PY, False, {"PYTHONPATH": PATCHED}), + "patched_httptools": (8891, SCRATCH_PY, False, {"PYTHONPATH": PATCHED}), + # only middleware-gc-3 (csrftoken closure <-> scope reference cycle removed) + "patched_best": ( + 8892, + SCRATCH_PY, + True, + { + "PYTHONPATH": PATCHED, + "E2E_HTTP": "httptools", + "E2E_ACCESS_LOG": "0", + "E2E_CONTENT_LENGTH": "1", + }, + ), +} + +ENDPOINTS = { + "actor": ("/-/actor.json", True), + "versions": ("/-/versions.json", False), + "static_css": ("/-/static/app.css", False), + "facetable": ("/fixtures/facetable.json?_size=5", False), +} + + +def _read(path): + with open(path) as fp: + return fp.read() + + +def cookie(): + # ds_actor cookie for {"id": "root"}, signed with the --secret in SERVE_ARGS + from itsdangerous import URLSafeSerializer + + return URLSafeSerializer("yoursecret", "actor").dumps({"a": {"id": "root"}}) + + +def start(names): + for name in names: + port, py, use_variant, env = VARIANTS[name] + pidfile = os.path.join(HERE, f"server_{port}.pid") + if os.path.exists(pidfile): + try: + os.kill(int(_read(pidfile)), 0) + print(f"{name}: already running on {port}") + continue + except (OSError, ValueError): + pass + if use_variant: + cmd = [py, os.path.join(HERE, "serve_variant.py"), "serve"] + else: + cmd = [py, "-m", "datasette", "serve"] + cmd += SERVE_ARGS + ["-p", str(port)] + full_env = dict(os.environ) + full_env.pop("PYTHONPATH", None) + full_env.update(env) + log = open( # noqa: SIM115 - handed to the server process + os.path.join(HERE, f"server_{port}.log"), "w" + ) + proc = subprocess.Popen( + cmd, + cwd=HERE, + env=full_env, + stdout=log, + stderr=subprocess.STDOUT, + start_new_session=True, + ) + with open(pidfile, "w") as fp: + fp.write(str(proc.pid)) + print(f"{name}: started pid {proc.pid} on {port}") + for name in names: + port = VARIANTS[name][0] + for _ in range(100): + try: + urllib.request.urlopen( + f"http://127.0.0.1:{port}/-/versions.json", timeout=2 + ).read() + break + except OSError: + time.sleep(0.2) + else: + print(f"{name}: did not come up") + + +def stop(names): + for name in names: + port = VARIANTS[name][0] + pidfile = os.path.join(HERE, f"server_{port}.pid") + if not os.path.exists(pidfile): + continue + pid = int(_read(pidfile)) + try: + os.kill(pid, signal.SIGINT) + for _ in range(50): + time.sleep(0.1) + os.kill(pid, 0) + os.kill(pid, signal.SIGKILL) + except OSError: + pass + os.remove(pidfile) + print(f"{name}: stopped {pid}") + + +CLK = os.sysconf("SC_CLK_TCK") + + +def cpu_ticks(pid): + """(process utime+stime, main-thread utime+stime) in clock ticks.""" + + def read(path): + with open(path) as fp: + fields = fp.read().rsplit(")", 1)[1].split() + # fields[0] is state (field 3); utime=field 14, stime=field 15 + return int(fields[11]) + int(fields[12]) + + return read(f"/proc/{pid}/stat"), read(f"/proc/{pid}/task/{pid}/stat") + + +def run_load(name, endpoint, conns, secs, procs, warmup=1.0): + port = VARIANTS[name][0] + pid = int(_read(os.path.join(HERE, f"server_{port}.pid"))) + before = cpu_ticks(pid) + res = _run_load(name, endpoint, conns, secs, procs, warmup) + after = cpu_ticks(pid) + n = res.get("requests_total") or res["requests"] + res["cpu_us_per_req"] = round((after[0] - before[0]) / CLK * 1e6 / n, 1) + res["main_cpu_us_per_req"] = round((after[1] - before[1]) / CLK * 1e6 / n, 1) + return res + + +def _run_load(name, endpoint, conns, secs, procs, warmup=1.0): + port = VARIANTS[name][0] + path, needs_cookie = ENDPOINTS[endpoint] + cmd = [ + LOADGEN_PY, + os.path.join(HERE, "load.py"), + "--port", + str(port), + "--path", + path, + "-c", + str(conns), + "-d", + str(secs), + "--warmup", + str(warmup), + "--procs", + str(procs), + "--json", + "--label", + name, + ] + if needs_cookie: + cmd += ["--cookie", "ds_actor=" + cookie()] + out = subprocess.run(cmd, capture_output=True, text=True, check=True).stdout + return json.loads(out) + + +def bench(kind, variants, endpoints, rounds, conns, secs, procs): + results_path = os.path.join(HERE, f"final_results_{kind}.jsonl") + collected = {} + for r in range(rounds): + for ep in endpoints: + order = list(variants) + if r % 2: + order.reverse() + for v in order: + res = run_load(v, ep, conns, secs, procs) + res.update( + { + "variant": v, + "endpoint": ep, + "round": r, + "kind": kind, + "ts": time.time(), + } + ) + with open(results_path, "a") as fp: + fp.write(json.dumps(res) + "\n") + collected.setdefault((ep, v), []).append(res) + print( + f"r{r} {ep:10s} {v:24s} {res['rps']:8.1f} req/s p50 {res['lat_us']['p50']:8.1f}us " + f"p99 {res['lat_us']['p99']:8.1f}us cpu {res.get('cpu_us_per_req')}us/req " + f"main {res.get('main_cpu_us_per_req')}us/req status={res['status']}", + flush=True, + ) + summarize(collected, variants, endpoints) + + +def summarize(collected, variants, endpoints): + print("\nMedians (us/request = 1e6 / req/s; latency p50/p99 in us):") + for ep in endpoints: + base = None + for v in variants: + rs = collected.get((ep, v)) + if not rs: + continue + rps = statistics.median(x["rps"] for x in rs) + p50 = statistics.median(x["lat_us"]["p50"] for x in rs) + p99 = statistics.median(x["lat_us"]["p99"] for x in rs) + us = 1e6 / rps + cpus = [x["cpu_us_per_req"] for x in rs if x.get("cpu_us_per_req")] + mains = [ + x["main_cpu_us_per_req"] for x in rs if x.get("main_cpu_us_per_req") + ] + cpu = statistics.median(cpus) if cpus else float("nan") + mcpu = statistics.median(mains) if mains else float("nan") + if base is None: + base = us + base_cpu = cpu + print( + f" {ep:10s} {v:24s} rps {rps:8.1f} {us:8.1f} us/req ({(us - base) / base:+6.1%})" + f" cpu {cpu:7.1f} us/req ({(cpu - base_cpu) / base_cpu:+6.1%}) main {mcpu:7.1f}" + f" p50 {p50:8.1f} p99 {p99:8.1f} runs={[x['rps'] for x in rs]}" + ) + + +def main(): + p = argparse.ArgumentParser() + p.add_argument("cmd") + p.add_argument("--variants", default=",".join(VARIANTS)) + p.add_argument("--endpoints", default=",".join(ENDPOINTS)) + p.add_argument("--rounds", type=int, default=3) + p.add_argument("--conns", type=int, default=8) + p.add_argument("--secs", type=float, default=8) + p.add_argument("--procs", type=int, default=2) + args = p.parse_args() + variants = args.variants.split(",") + endpoints = args.endpoints.split(",") + if args.cmd == "start": + start(variants) + elif args.cmd == "stop": + stop(variants) + elif args.cmd == "tput": + bench( + "tput", variants, endpoints, args.rounds, args.conns, args.secs, args.procs + ) + elif args.cmd == "lat": + bench("lat", variants, endpoints, args.rounds, 1, args.secs, 1) + elif args.cmd == "summary": + kind = args.endpoints if False else None + for kind in ("tput", "lat"): + path = os.path.join(HERE, f"final_results_{kind}.jsonl") + if not os.path.exists(path): + continue + collected = {} + for line in _read(path).splitlines(): + x = json.loads(line) + if x["variant"] in variants and x["endpoint"] in endpoints: + collected.setdefault((x["endpoint"], x["variant"]), []).append(x) + print(f"== {kind}") + summarize(collected, variants, endpoints) + + +if __name__ == "__main__": + main() diff --git a/perf/request-response/tools/load.py b/perf/request-response/tools/load.py new file mode 100644 index 00000000..c7b8945a --- /dev/null +++ b/perf/request-response/tools/load.py @@ -0,0 +1,253 @@ +""" +Minimal HTTP/1.1 keep-alive load generator (stdlib only, raw asyncio sockets). + +Each of N connections is an asyncio.Protocol that sends one GET, parses the +response (Content-Length or chunked), records latency, and immediately sends +the next request on the same connection (closed-loop, like wrk -c N). + +Usage: + python load.py --port 8801 --path /-/versions.json -c 8 -d 10 [--warmup 1] + [--cookie 'ds_actor=...'] [--header 'If-None-Match: "abc"'] + [--procs 2] [--json] + +--procs P splits the N connections over P worker processes so that the load +generator itself is not the bottleneck. +""" + +import argparse +import asyncio +import json +import multiprocessing +import statistics +import time + +HEADERS, BODY_CL, CHUNK_SIZE, CHUNK_DATA, CHUNK_END = range(5) + + +class Conn(asyncio.Protocol): + def __init__(self, request, stats, deadline_holder, done): + self.request = request + self.stats = stats + self.deadline = deadline_holder + self.done = done + self.buf = bytearray() + self.state = HEADERS + self.remaining = 0 + self.status = 0 + self.body_bytes = 0 + self.t0 = 0 + + def connection_made(self, transport): + self.transport = transport + self.send() + + def send(self): + self.state = HEADERS + self.body_bytes = 0 + self.t0 = time.perf_counter_ns() + self.transport.write(self.request) + + def connection_lost(self, exc): + if not self.done.done(): + self.stats["errors"] += 1 + self.done.set_result(None) + + def data_received(self, data): + self.buf += data + while self._parse(): + now = time.perf_counter_ns() + st = self.stats + st["all"] += 1 + if now >= st["measure_from"]: + st["lat"].append(now - self.t0) + st["status"][self.status] = st["status"].get(self.status, 0) + 1 + st["bytes"] += self.body_bytes + if now >= self.deadline[0]: + if not self.done.done(): + self.done.set_result(None) + self.transport.close() + return + self.send() + + def _parse(self): + """Advance the state machine. Return True when a full response is in.""" + buf = self.buf + while True: + if self.state == HEADERS: + idx = buf.find(b"\r\n\r\n") + if idx < 0: + return False + head = bytes(buf[:idx]) + del buf[: idx + 4] + self.status = int(head[9:12]) + lower = head.lower() + cl = lower.find(b"\r\ncontent-length:") + if cl >= 0: + end = lower.find(b"\r\n", cl + 2) + if end < 0: + end = len(lower) + self.remaining = int(lower[cl + 17 : end].strip()) + self.state = BODY_CL + elif b"\r\ntransfer-encoding: chunked" in lower: + self.state = CHUNK_SIZE + else: + # 304 / 204 / no body + self.state = HEADERS + return True + elif self.state == BODY_CL: + n = min(self.remaining, len(buf)) + del buf[:n] + self.remaining -= n + self.body_bytes += n + if self.remaining: + return False + self.state = HEADERS + return True + elif self.state == CHUNK_SIZE: + idx = buf.find(b"\r\n") + if idx < 0: + return False + size = int(bytes(buf[:idx]).split(b";")[0], 16) + del buf[: idx + 2] + if size == 0: + self.state = CHUNK_END + else: + self.remaining = size + 2 + self.body_bytes += size + self.state = CHUNK_DATA + elif self.state == CHUNK_DATA: + n = min(self.remaining, len(buf)) + del buf[:n] + self.remaining -= n + if self.remaining: + return False + self.state = CHUNK_SIZE + elif self.state == CHUNK_END: + # assume no trailers + if len(buf) < 2: + return False + del buf[:2] + self.state = HEADERS + return True + + +def build_request(args): + lines = [ + f"GET {args.path} HTTP/1.1", + f"Host: {args.host}:{args.port}", + "User-Agent: load.py", + "Accept: */*", + "Connection: keep-alive", + ] + if args.cookie: + lines.append(f"Cookie: {args.cookie}") + lines.extend(args.header or []) + return ("\r\n".join(lines) + "\r\n\r\n").encode("latin-1") + + +async def run_worker(args, conns): + loop = asyncio.get_running_loop() + request = build_request(args) + start = time.perf_counter_ns() + stats = { + "lat": [], + "status": {}, + "bytes": 0, + "errors": 0, + "all": 0, + "measure_from": start + int(args.warmup * 1e9), + } + deadline = [start + int((args.warmup + args.duration) * 1e9)] + dones = [] + for _ in range(conns): + done = loop.create_future() + dones.append(done) + await loop.create_connection( + lambda d=done: Conn(request, stats, deadline, d), args.host, args.port + ) + await asyncio.gather(*dones) + end = time.perf_counter_ns() + stats["elapsed"] = (end - stats["measure_from"]) / 1e9 + return stats + + +def worker_entry(payload): + args, conns = payload + return asyncio.run(run_worker(args, conns)) + + +def pct(sorted_vals, p): + if not sorted_vals: + return float("nan") + k = min(len(sorted_vals) - 1, round(p / 100 * (len(sorted_vals) - 1))) + return sorted_vals[k] + + +def main(): + p = argparse.ArgumentParser() + p.add_argument("--host", default="127.0.0.1") + p.add_argument("--port", type=int, required=True) + p.add_argument("--path", required=True) + p.add_argument("-c", "--connections", type=int, default=8) + p.add_argument("-d", "--duration", type=float, default=10) + p.add_argument("--warmup", type=float, default=1.0) + p.add_argument("--procs", type=int, default=1) + p.add_argument("--cookie") + p.add_argument("--header", action="append") + p.add_argument("--json", action="store_true") + p.add_argument("--label", default="") + args = p.parse_args() + + procs = max(1, min(args.procs, args.connections)) + if procs == 1: + results = [asyncio.run(run_worker(args, args.connections))] + else: + split = [args.connections // procs] * procs + for i in range(args.connections % procs): + split[i] += 1 + ctx = multiprocessing.get_context("fork") + with ctx.Pool(procs) as pool: + results = pool.map(worker_entry, [(args, n) for n in split]) + + lat = sorted(x for r in results for x in r["lat"]) + status = {} + for r in results: + for k, v in r["status"].items(): + status[k] = status.get(k, 0) + v + elapsed = statistics.mean(r["elapsed"] for r in results) + n = len(lat) + out = { + "label": args.label, + "path": args.path, + "connections": args.connections, + "procs": procs, + "requests": n, + "elapsed_s": round(elapsed, 3), + "rps": round(n / elapsed, 1) if elapsed else 0, + "lat_us": { + "mean": round(statistics.mean(lat) / 1e3, 1) if lat else None, + "p50": round(pct(lat, 50) / 1e3, 1), + "p90": round(pct(lat, 90) / 1e3, 1), + "p99": round(pct(lat, 99) / 1e3, 1), + "p99.9": round(pct(lat, 99.9) / 1e3, 1), + "max": round(lat[-1] / 1e3, 1) if lat else None, + }, + "status": status, + "avg_body_bytes": round(sum(r["bytes"] for r in results) / n) if n else 0, + "errors": sum(r["errors"] for r in results), + "requests_total": sum(r["all"] for r in results), + } + if args.json: + print(json.dumps(out)) + else: + l = out["lat_us"] + print( + f"{args.label or args.path}: c={args.connections} {out['rps']} req/s " + f"n={n} p50={l['p50']}us p90={l['p90']}us p99={l['p99']}us " + f"max={l['max']}us status={status} body={out['avg_body_bytes']}B " + f"errors={out['errors']}" + ) + + +if __name__ == "__main__": + main() diff --git a/perf/request-response/tools/serve_variant.py b/perf/request-response/tools/serve_variant.py new file mode 100644 index 00000000..db8181f1 --- /dev/null +++ b/perf/request-response/tools/serve_variant.py @@ -0,0 +1,146 @@ +""" +Run exactly `datasette serve ...` (datasette.cli.cli), but let environment +variables tweak how uvicorn is configured, WITHOUT editing datasette source: + + E2E_HTTP=h11|httptools|auto -> uvicorn.Config(http=...) + E2E_ACCESS_LOG=0 -> uvicorn.Config(access_log=False) + E2E_LOOP=uvloop -> asyncio.run(..., loop_factory=uvloop.new_event_loop) + E2E_GC_FREEZE=1 -> gc.collect(); gc.freeze() just before uvicorn serves + E2E_SWITCH=0.0005 -> sys.setswitchinterval(0.0005) (GIL convoy experiment) + E2E_CONTENT_LENGTH=1 -> (experiment) Response.asgi_send adds a + content-length header, so h11 uses + Content-Length framing instead of chunked + E2E_COALESCE=1 -> (experiment) uvicorn h11 cycle buffers the + status line+headers and writes them together + with the body in one transport write + +Usage: python serve_variant.py serve fixtures.db -p 8801 --secret s ... +""" + +import asyncio +import gc +import os +import sys + +import uvicorn + +_orig_config_init = uvicorn.Config.__init__ + + +def _config_init(self, app, **kw): + http = os.environ.get("E2E_HTTP") + if http: + kw["http"] = http + if os.environ.get("E2E_ACCESS_LOG") == "0": + kw["access_log"] = False + _orig_config_init(self, app, **kw) + + +uvicorn.Config.__init__ = _config_init + +if os.environ.get("E2E_GC_FREEZE") == "1": + _orig_serve = uvicorn.Server.serve + + async def _serve(self, sockets=None): + gc.collect() + gc.freeze() + return await _orig_serve(self, sockets) + + uvicorn.Server.serve = _serve + +if os.environ.get("E2E_LOOP") == "uvloop": + import uvloop + + _orig_run = asyncio.run + + def _run(main, **kw): + kw.setdefault("loop_factory", uvloop.new_event_loop) + return _orig_run(main, **kw) + + asyncio.run = _run + +if os.environ.get("E2E_CONTENT_LENGTH") == "1": + from datasette.utils import asgi as _dsasgi + + async def _asgi_send(self, send): + headers = {} + headers.update(self.headers) + headers["content-type"] = self.content_type + body = self.body + if not isinstance(body, bytes): + body = body.encode("utf-8") + raw_headers = [ + [key.encode("utf-8"), value.encode("utf-8")] + for key, value in headers.items() + ] + if not any(k.lower() == "content-length" for k in headers): + raw_headers.append([b"content-length", str(len(body)).encode("latin-1")]) + for set_cookie in self._set_cookie_headers: + raw_headers.append([b"set-cookie", set_cookie.encode("utf-8")]) + await send( + { + "type": "http.response.start", + "status": self.status, + "headers": raw_headers, + } + ) + await send({"type": "http.response.body", "body": body}) + + _dsasgi.Response.asgi_send = _asgi_send + +if os.environ.get("E2E_COALESCE") == "1": + from uvicorn.protocols.http import h11_impl as _h11_impl + + class _BufferedTransport: + __slots__ = ("_buf", "_t") + + def __init__(self, t): + self._t = t + self._buf = [] + + def write(self, data): + if data: + self._buf.append(data) + + def flush(self): + if self._buf: + buf = self._buf + self._buf = [] + self._t.write(buf[0] if len(buf) == 1 else b"".join(buf)) + + def close(self): + self.flush() + self._t.close() + + def __getattr__(self, name): + return getattr(self._t, name) + + _orig_cycle_send = _h11_impl.RequestResponseCycle.send + + async def _cycle_send(self, message): + t = self.transport + if not isinstance(t, _BufferedTransport): + t = self.transport = _BufferedTransport(t) + await _orig_cycle_send(self, message) + if message["type"] != "http.response.start": + t.flush() + + _h11_impl.RequestResponseCycle.send = _cycle_send + +if os.environ.get("E2E_STATIC_CHUNK"): + # (experiment) asgi_static(root_path, chunk_size=4096, ...) -> bigger chunks + from datasette.utils import asgi as _dsasgi2 + + _d = list(_dsasgi2.asgi_static.__defaults__) + _d[0] = int(os.environ["E2E_STATIC_CHUNK"]) + _dsasgi2.asgi_static.__defaults__ = tuple(_d) + +if os.environ.get("E2E_SWITCH"): + # (experiment) shorter GIL switch interval (default 0.005s) + sys.setswitchinterval(float(os.environ["E2E_SWITCH"])) + +from datasette.cli import cli + +if __name__ == "__main__": + sys.argv[0] = "datasette" + cli(sys.argv[1:])