feat: use preset avatars and disable leaderboard by default

This commit is contained in:
Codex
2026-06-30 14:07:48 +08:00
parent 8e3252081f
commit 9299552451
18 changed files with 228 additions and 52 deletions

View File

@@ -61,6 +61,7 @@ npm run perf:api:local
| `PERF_RAMP_SECONDS` | `3` | 并发爬坡时间 |
| `PERF_QUESTION_LIMIT` | `20` | 单次合集题目请求数量 |
| `PERF_INCLUDE_WRITES` | `false` | 是否加入创建练习 session 写请求 |
| `PERF_INCLUDE_LEADERBOARD` | `false` | 是否加入排行榜接口;排行榜租户默认关闭,仅在租户明确开启并需要专项压测时打开 |
| `PERF_OUTPUT_DIR` | `docs/refactor/performance-reports` | 报告输出目录 |
| `PERF_REQUEST_TIMEOUT_MS` | `15000` | 单请求超时 |
@@ -78,12 +79,18 @@ npm run perf:api:local
- `/api/catalog/practice-blueprints`
- `/api/learning/stats`
- `/api/learning/trend`
- `/api/learning/leaderboard`
- `/api/catalog/vocabulary-words`
- `/api/learning/vocabulary/stats`
- `/api/catalog/handbook-chapters`
- `/api/catalog/handbook-entries?includeContent=true`
排行榜租户默认关闭,不进入默认压测负载。只有在租户已经开启 `feature_flags.enableLeaderboard=true`,并准备验证独立排行榜页或活动页容量时,才打开:
```powershell
$env:PERF_INCLUDE_LEADERBOARD="true"
npm run perf:api:local
```
写入路径默认关闭。只有在专门的测试库或可丢弃预生产库中,才建议打开:
```powershell