Expand description
Offline HTTP cassette and fault-injection support for provider adapters.
The server intentionally speaks HTTP/1.1 over a loopback socket. This keeps provider tests independent from a production HTTP stack while still exercising real request serialization, response streaming, delays, and mid-stream disconnects.
Structs§
- Benchmark
Failure Count - Count of failures in one normalized category.
- Benchmark
Invocation - Result and host-observed timing for one invocation.
- Benchmark
Plan - Bounded benchmark execution plan.
- Benchmark
Regression Comparison - Complete baseline-to-candidate benchmark decision.
- Benchmark
Regression Metric - One comparable benchmark metric and its gate decision.
- Benchmark
Regression Policy - Allowed degradation from a baseline report.
- Cassette
Server - A loopback server executing a fixed sequence of HTTP exchanges.
- Error
Contract - Expected classification of a failed provider invocation.
- Http
Exchange - One expected request and its scripted response.
- Latency
Distribution - Latency distribution expressed in integer microseconds.
- Model
Benchmark Target - Canonical Runifold model adapter for
BenchmarkTarget. - Observed
Request - A request captured by the cassette server.
- Provider
Benchmark Report - Stable, serialization-safe benchmark evidence.
- Provider
Conformance Report - Evidence produced by a conformance run.
- Response
Chunk - One response body fragment and the delay before it is sent.
- Scripted
Response - A streamed HTTP response, optionally disconnected before its terminator.
- Server
Stats - Snapshot of cassette-server concurrency and completion counters.
- Success
Contract - Expected canonical result of a successful provider invocation.
Enums§
- Benchmark
Failure Kind - Stable framework-neutral failure category.
- Benchmark
Invocation Error - Invalid timing evidence supplied by a benchmark adapter.
- Cassette
Error - Errors produced by cassette construction, serving, or verification.
- Conformance
Check - One successfully verified provider behavior.
- Provider
Benchmark Error - Benchmark construction or comparison failure.
- Provider
Conformance Error - A provider violated its canonical acceptance contract.
Traits§
- Benchmark
Target - Framework-neutral operation executed by the benchmark runner.
Functions§
- benchmark
- Runs warmup and measured invocations against one framework-neutral target.
- compare_
benchmarks - Compares two reports using one explicit regression policy.
- verify_
error - Executes and verifies one failed canonical provider invocation.
- verify_
success - Executes and verifies one successful canonical provider invocation.
Type Aliases§
- Benchmark
Future - A boxed benchmark invocation future.