From e12e59461bf3b340afdf3b21e55f3d6ddc0cafa6 Mon Sep 17 00:00:00 2001 From: xfy Date: Mon, 15 Jun 2026 10:41:03 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E6=95=B4=E7=90=86=E8=A1=A8=E6=A0=BC?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E5=B9=B6=E6=B7=BB=E5=8A=A0=20CI=20=E9=93=BE?= =?UTF-8?q?=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DEVELOPMENT.md | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 551f167..efe4be1 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -41,26 +41,30 @@ hey -c 100 -n 100000 http://localhost:8080/ ### Key Metrics to Watch -| Metric | Description | -|--------|-------------| -| Requests/sec | Throughput | -| Average latency | Mean response time | -| P99 latency | Tail latency | -| Status codes | Error rate (should be 0) | +| Metric | Description | +| -------------------- | ---------------------------- | +| Requests/sec | Throughput | +| Average latency | Mean response time | +| P99 latency | Tail latency | +| Status codes | Error rate (should be 0) | | Latency distribution | Consistency (tight = stable) | ### Flame Graph Hotspots -| Expected Hotspot | Code Location | Cause | -|------------------|---------------|-------| -| SSR rendering | Dioxus framework | Virtual DOM diff + render per request | -| `deadpool` connection acquisition | `src/db/mod.rs` | Connection pool contention under concurrency | -| `moka` cache lookup | `src/cache.rs` | Cache hit/miss overhead | -| `tokio` scheduling | tokio runtime | Async task dispatch | -| `serde` serialization | Models | Post/User serialization | +| Expected Hotspot | Code Location | Cause | +| --------------------------------- | ---------------- | -------------------------------------------- | +| SSR rendering | Dioxus framework | Virtual DOM diff + render per request | +| `deadpool` connection acquisition | `src/db/mod.rs` | Connection pool contention under concurrency | +| `moka` cache lookup | `src/cache.rs` | Cache hit/miss overhead | +| `tokio` scheduling | tokio runtime | Async task dispatch | +| `serde` serialization | Models | Post/User serialization | ### Tuning - `DB_POOL_SIZE` — increase if `deadpool` / `Semaphore` shows high in flame graph - `SSR_CACHE_SECS` — increase to cache SSR output longer - `TOKIO_WORKER_THREADS` — explicitly set worker thread count + +## CI + +https://git.rua.plus/api/v1/repos/xfy/yggdrasil/actions/tasks