Skip to content

Commit c8862a0

Browse files
committed
pd-edge: add performance test
1 parent db5f70e commit c8862a0

3 files changed

Lines changed: 1075 additions & 0 deletions

File tree

‎pd-edge/Cargo.toml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ http-body-util = "0.1"
2424
vm = { package = "pd-vm", path = "../pd-vm" }
2525
edge_abi = { package = "pd-edge-abi", path = "../pd-edge-abi" }
2626
serde = { version = "1", features = ["derive"] }
27+
serde_json = "1"
2728
tracing = "0.1"
2829
tracing-subscriber = { version = "0.3", features = ["env-filter", "fmt", "ansi"] }
2930
owo-colors = "4"

‎pd-edge/README.md‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,30 @@ cargo run -p pd-edge --bin pd-edge-http-proxy -- `
156156
--control-plane-rpc-timeout-ms "5000"
157157
```
158158

159+
## HTTP Proxy Performance Framework
160+
161+
Run the built-in framework to benchmark these scenarios:
162+
163+
- raw `pd-edge-http-proxy` (no program loaded)
164+
- proxy with a compute-only program (no host calls; baseline workload)
165+
- proxy with additive async HTTP host calls on top of the same workload (`get_method/get_path/get_header/get_body` + `set_header/set_body`) and explicit termination (no upstream target)
166+
167+
Example:
168+
169+
```bash
170+
cargo run -p pd-edge --example http_proxy_perf_framework --release -- \
171+
--requests 20000 \
172+
--warmup-requests 2000 \
173+
--concurrency 128 \
174+
--json-out target/http_proxy_perf_results.json
175+
```
176+
177+
Reported metrics per scenario include:
178+
179+
- latency: `median (p50)`, `p90`, `p95`, `p99`, `mean`, `min`, `max`
180+
- memory: process RSS `start/end/min/avg/max/peak`
181+
- status breakdown, request errors, throughput, and telemetry snapshot
182+
159183
## ABI Source of Truth
160184

161185
Host-call ABI metadata is centralized in `pd-edge-abi`:

0 commit comments

Comments
 (0)