Docs / Load & performance
Testing mode
Load & performance
Protocol-aware latency and load in the same CI suite as functional tests — not a separate load product.
Latency
p90 / p95 / p99 + warmup
Load
Burst · soak · ramp
Gates
RPS · percentiles · errors
assert_latency
assert_throughput
assert_load_phases
assert_stateless_throughput
Latency budget
from mcp_test_harness import assert_latency, marker
@marker(tags=["perf"])
async def test_echo_p95(mcp_server):
await assert_latency(
mcp_server, "echo", {"text": "hi"},
max_ms=200, runs=20, aggregate="p95", warmup=3,
)
Concurrent load
Fixed burst (total_calls) or closed-loop soak (duration_s). Optional weighted multi-tool calls.
from mcp_test_harness import assert_throughput, marker
@marker(tags=["perf", "load"])
async def test_echo_soak(mcp_server):
await assert_throughput(
mcp_server, "echo", {"text": "load"},
concurrent=8, duration_s=5,
min_rps=10, max_p95_ms=300, max_error_rate=0.02,
)
Concurrency ramp
Warmup phases are measured but excluded from aggregate SLO gates.
from mcp_test_harness import assert_load_phases, marker
@marker(tags=["perf", "load"])
async def test_echo_ramp(mcp_server):
await assert_load_phases(
mcp_server, "echo", {"text": "load"},
phases=[
{"name": "warmup", "concurrent": 4, "duration_s": 1, "warmup": True},
{"name": "c16", "concurrent": 16, "duration_s": 3},
],
min_rps=10, max_p95_ms=400,
)
CI + report
mcp-test -m perf --report-format html --report-output report.html mcp-test export-pdf report.html
The HTML report includes a Load & performance SLOs panel (suite percentiles + perf-tagged tests). It is CI evidence, not a JMeter live GUI — pair with k6/JMeter for datacenter-scale RPS.