Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
361 changes: 0 additions & 361 deletions Cargo.lock

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ members = [
"crates/contextforge-data-plane-apis",
"crates/contextforge-data-plane-cpex",
"crates/contextforge-data-plane-lib",
"crates/contextforge-load-test",
"crates/plugins/cpex-secrets-detection",
]
resolver = "3"
Expand Down
19 changes: 7 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,12 @@ cargo run --release \
cargo run --features contextforge-data-plane-lib/with_tools \
-- \
--address 0.0.0.0:8080 \
--redis-address 127.0.0.1 \
--redis-port 6379 \
--redis-address 127.0.0.1 \
--redis-port 6379 \
--redis-mode plain-text \
--token-verification-private-key ./assets/jwt.key \
--token-verification-public-key ./assets/jwt.key.pub \
--upstream-connection-mode plain-text-or-tls \
--upstream-connection-mode plain-text-or-tls \
--tls-address 0.0.0.0:8443 \
--server-private-key ./assets/tls_key.pem \
--server-certificate ./assets/tls_certificate.pem
Expand All @@ -103,12 +103,7 @@ The data plane exports OTLP traces and metrics. Local Langfuse, OTel Collector,

## Performance Tests

With a configured data plane running on port `8001`:

```bash
cargo run --release --bin contextforge-load-test -- \
--host http://127.0.0.1:8001 \
-r 40 -u 120 --run-time 120s --report-file report.html
```

Existing benchmark results are under [reports](reports).
Performance testing uses the control-plane Locust suite through
[`cf-integration`](https://github.com/contextforge-org/contextforge-dev-tools).
See the [performance guide](_context/wiki/performance.md) for load and baseline
runs.
2 changes: 1 addition & 1 deletion _context/wiki/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ then follow only the links that are relevant.
| [config.md](config.md) | Key CLI flags, JWT claims, UserConfig shape, plugin config, telemetry debugging, startup validation, local observability stack |
| [deployment.md](deployment.md) | External-dataplane deployment checklist, health endpoint caveat, nginx routing, TLS choices, session affinity, Redis availability, image pinning |
| [security.md](security.md) | Trust boundaries among the control plane, built-in dataplane, and external dataplane; Origin/Host validation; transport security; secrets handling |
| [performance.md](performance.md) | External-dataplane-only load testing (Goose), full-stack Locust runs, benchmark settings, built-in-dataplane baseline |
| [performance.md](performance.md) | Control-plane Locust load runs, benchmark settings, and built-in-dataplane baseline |
| [testing.md](testing.md) | Workspace checks, in-repo integration tests, full-stack harness lanes, settings, and control-plane baseline |

## Quick orientation
Expand Down
25 changes: 5 additions & 20 deletions _context/wiki/performance.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,12 @@
# Performance And Load Testing

## Two Load Paths

- **External-dataplane-only:** `contextforge-load-test` measures the ContextForge external dataplane in isolation.
- **Full-stack:** `cf-integration` measures the nginx → external dataplane → backend request path with Locust while the ContextForge control plane publishes configuration.

Use the first to profile gateway changes; use the second to measure what users see.

## External-Dataplane-Only (Goose)

`crates/contextforge-load-test` is a [Goose](https://book.goose.rs/)-based driver that speaks full streamable HTTP MCP. Start the local stack and seed user config first (see [getting-started.md](getting-started.md)), then:

```bash
cargo run --release --bin contextforge-load-test -- \
--host 'http://127.0.0.1:8001' \
-u 120 -r 40 --run-time 120s \
--report-file report.html
```

`-u` = concurrent users, `-r` = spawn rate/s, `--report-file` = HTML report. Curated run reports live in `reports/`.

## Full-Stack Load (Locust via cf-integration)

Performance testing uses the control-plane Locust suite through
[`cf-integration`](https://github.com/contextforge-org/contextforge-dev-tools).
It measures the nginx → external dataplane → backend request path while the
ContextForge control plane publishes configuration.

| Command | What it runs |
| --- | --- |
| `scripts/cf-integration.sh smoke` | 1 user for 10 s — quick sanity pass. |
Expand Down
1 change: 0 additions & 1 deletion _context/wiki/project.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ Architecture context lives in the wiki. Key pages:
| `contextforge-data-plane` (binary) | Process shell only: CLI flags, logging, runtime shape. No ContextForge external-dataplane logic. |
| `contextforge-data-plane-apis` | Shared config shapes (`UserConfig`, `User`, plugin config). Regenerate JSON schemas after any change: `cargo run -p contextforge-data-plane-apis`. |
| `contextforge-data-plane-cpex` | Plugin integration (CPEX hook factories). |
| `contextforge-load-test` | Performance harness: end-to-end MCP traffic driver. |

**Key invariants:**
- Redis/config access goes through `UserConfigStore` only — never leak Redis details into routing code.
Expand Down
23 changes: 0 additions & 23 deletions crates/contextforge-load-test/Cargo.toml

This file was deleted.

212 changes: 0 additions & 212 deletions crates/contextforge-load-test/src/main.rs

This file was deleted.

5 changes: 0 additions & 5 deletions deny.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
[advisories]
ignore = [
{ id = "RUSTSEC-2026-0214", reason = "Transitive through the load-test-only Goose crate, which has no maintained CLI replacement yet" },
]

## This doesn't work at the moment. see https://github.com/EmbarkStudios/cargo-deny/issues/859
[[licenses.exceptions]]
allow = ["CDLA-Permissive-2.0"]
Expand Down
Loading