test(go): record 10k gateway connection baseline

This commit is contained in:
lingniu
2026-07-03 18:09:53 +08:00
parent 291bffa340
commit 65232812a1
3 changed files with 54 additions and 6 deletions

View File

@@ -481,9 +481,9 @@ git commit -m "ops: document 100k gateway sysctl rollout"
- Modify: `go/vehicle-gateway/cmd/load-sim/main.go`
- Modify: `go/vehicle-gateway/internal/loadsim/*`
- [ ] **Step 1: Implement JT808 connection hold mode**
- [x] **Step 1: Implement JT808 connection hold mode**
Extend load-sim to open N TCP connections and keep them open for `duration`, without sending frames.
Extended load-sim with `-send=false` to open N TCP connections and keep them open for `duration`, without sending frames.
Expected CLI:
@@ -491,7 +491,7 @@ Expected CLI:
go run ./cmd/load-sim -protocol jt808 -addr 115.29.187.205:808 -connections 10000 -send-interval 30s -duration 5m -send=false
```
- [ ] **Step 2: Run from non-production client**
- [x] **Step 2: Run from non-production client**
Run a small smoke first:
@@ -499,9 +499,9 @@ Run a small smoke first:
go run ./cmd/load-sim -protocol jt808 -addr 115.29.187.205:808 -connections 100 -duration 30s -send=false
```
Then run 10K only after smoke succeeds.
Actual: ran on ECS loopback `127.0.0.1:808` to avoid external network limits and avoid business frame pollution.
- [ ] **Step 3: Capture metrics during test**
- [x] **Step 3: Capture metrics during test**
On ECS:
@@ -513,7 +513,7 @@ ss -tn sport = :808 | wc -l
journalctl -u lingniu-go-gateway.service --since '10 minutes ago' --no-pager | grep -Ei 'error|failed|panic|fatal' || true
```
- [ ] **Step 4: Update capacity baseline**
- [x] **Step 4: Update capacity baseline**
Record:
@@ -523,6 +523,8 @@ Record:
- connection rejection count
- errors
Actual: recorded 100 / 1,000 / 10,000 hold-only results in `docs/ops/100k-capacity-baseline.md`.
- [ ] **Step 5: Commit**
```bash