← back to Wallco Ai
data/yolo-overnight/endpoint-perf-20260525-1155.md
42 lines
# wallco-ai Endpoint Performance — 2026-05-25 11:55 PT
**Target:** `http://127.0.0.1:9905` (PM2 `wallco-ai`, pid 1890751, cwd `/root/public-projects/wallco-ai`)
**Method:** 1 warmup + 10 samples per endpoint, sequential. `curl -w %{time_total}` from same host (loopback).
**Note on RTT floor:** Loopback curl carries ~1–2 ms per request just for connect/teardown, so any sub-2 ms endpoint is effectively at the noise floor.
## Results (median / p95)
| Endpoint | Method | Status | Median ms | p95 ms | Min ms | Max ms |
|---|---|---:|---:|---:|---:|---:|
| `/` | GET | 200 | **25.6** | 32.7 | 23.2 | 35.2 |
| `/designs` | GET | 200 | **35.4** | 45.1 | 32.6 | 45.2 |
| `/api/designs` | GET | 200 | **17.1** | 18.1 | 15.9 | 18.4 |
| `/design/41509` *(user-spec)* | GET | **404** | 55.9 | 56.6 | 50.7 | 59.2 |
| `/design/39333` *(valid id, substitute)* | GET | 200 | **6.5** | 8.0 | 5.5 | 8.2 |
| `/api/dedupe/scan` *(POST `{"limit":5}`)* | POST | 200 | **461.2** | 468.4 | 437.9 | 469.2 |
| `/api/library` | GET | 200 | **28.1** | 29.9 | 25.3 | 33.0 |
| `/admin/status-browser` | GET | 200 | **2.2** | 2.4 | 1.9 | 3.9 |
| `/api/trade/me` | GET | 200 | **1.8** | 2.0 | 1.5 | 2.1 |
| `/api/colors-of-design/41509` *(no route)* | GET | **404** | 1.7 | 2.1 | 1.5 | 5.1 |
| `/api/bg-textures` | GET | 200 | **52.5** | 55.1 | 47.5 | 56.1 |
## Spec deviations from request
The original 10-endpoint list had three issues — surfaced and worked around so the report reflects real workload:
1. **`/api/dedupe/scan` is POST, not GET.** The route lives at `server.js:8251` (`app.post('/api/dedupe/scan', …)`). GET 404s in 1.8 ms (Express route-miss). POST with `{"limit":5}` hit 461 ms median — that's the perceptual-hash scan doing real work.
2. **`/design/41509` 404s** — that design id does not exist in the catalog. Highest live id from `/api/designs` is 39333. Kept the 41509 row (since you asked for it) and added 39333 as a substitute showing the real warm-cache performance of `/design/:id` (6.5 ms median, the fastest 200 in the set).
3. **`/api/colors-of-design/:id` route does not exist.** `grep` across `/root/public-projects/wallco-ai` returns zero matches. All 11 requests hit Express's default 404 handler in ~2 ms.
## Observations
- **Hot path is healthy.** `/api/trade/me`, `/admin/status-browser`, `/design/39333` are sub-10 ms — these are near the loopback noise floor.
- **`/api/dedupe/scan` is the outlier by 10×.** 461 ms median for `limit=5` is the only endpoint not bound by Node CPU / DB lookup speed — it's doing per-image pHash work. If this gets called interactively (UI ‘scan’ button) it needs a spinner; if it's batch-only it's fine. Worth profiling if call rate climbs.
- **`/designs` (35 ms) is ~2× `/api/designs` (17 ms).** Same data, but `/designs` renders the gallery HTML page; the gap is template + asset list overhead, not the query.
- **`/api/bg-textures` (52 ms) and `/` (26 ms)** are the two static-ish endpoints with noticeable cost — likely doing fs.readdir / template render per request. Low-hanging cache target if either becomes hot.
- **404 cost split:** Express route-miss (`/api/colors-of-design/...`, GET to POST-only `/api/dedupe/scan`) returns in ~2 ms. `/design/41509` 404 takes 56 ms because the route matches and the handler does a DB lookup before returning 404 — that's the cost of "design exists?" being a real query, not a router miss.
## Raw command
`/tmp/wallco-bench2.sh` (loopback, sequential, 10 samples + 1 warmup per endpoint).