docs: project docs, scripts, deployment configs, and evidence
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
# Local Observability Baseline
|
||||
|
||||
- Generated at: 2026-03-27 18:20:30 +08:00
|
||||
- Scope: single-node local baseline, not a production traffic certification result
|
||||
|
||||
## Concurrent Login Baseline
|
||||
|
||||
- Source command: `go test ./internal/e2e -run TestE2EConcurrentLogin -v -count=1`
|
||||
- Concurrency configured by test: 20
|
||||
- Result: success=2 fail=18 status=map[200:2 429:18] total=117.7617ms avg=13.83308ms
|
||||
- Interpretation: current login rate limiter absorbs most burst traffic with 429, while successful requests remained sub-second and no 5xx appeared.
|
||||
|
||||
## Browser Flow Baseline
|
||||
|
||||
- Source command: `cd frontend/admin && npm.cmd run e2e:auth-smoke:win`
|
||||
- login-initial: 99ms
|
||||
- login-desktop: 186ms
|
||||
- login-tablet: 117ms
|
||||
- login-mobile: 96ms
|
||||
- Interpretation: current raw CDP browser validation stayed well below the existing `HighResponseTime` alert threshold of 1s in `deployment/alertmanager/alerts.yml`.
|
||||
|
||||
## Evidence Files
|
||||
|
||||
- concurrent-login-20260327-182005.txt
|
||||
- raw-cdp-auth-smoke-20260327-182005.txt
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
=== RUN TestE2EConcurrentLogin
|
||||
2026/03/27 18:20:09 [API] 2026-03-27 18:20:09 POST /api/v1/auth/register | status: 200 | latency: 110.5421ms | ip: 127.0.0.1 | user_id: <nil> | ua: Go-http-client/1.1
|
||||
2026/03/27 18:20:09 [API] 2026-03-27 18:20:09 POST /api/v1/auth/login | status: 429 | latency: 611.7µs | ip: 127.0.0.1 | user_id: <nil> | ua: Go-http-client/1.1
|
||||
2026/03/27 18:20:09 [API] 2026-03-27 18:20:09 POST /api/v1/auth/login | status: 429 | latency: 0s | ip: 127.0.0.1 | user_id: <nil> | ua: Go-http-client/1.1
|
||||
2026/03/27 18:20:09 [API] 2026-03-27 18:20:09 POST /api/v1/auth/login | status: 429 | latency: 0s | ip: 127.0.0.1 | user_id: <nil> | ua: Go-http-client/1.1
|
||||
2026/03/27 18:20:09 [API] 2026-03-27 18:20:09 POST /api/v1/auth/login | status: 429 | latency: 0s | ip: 127.0.0.1 | user_id: <nil> | ua: Go-http-client/1.1
|
||||
2026/03/27 18:20:09 [API] 2026-03-27 18:20:09 POST /api/v1/auth/login | status: 429 | latency: 0s | ip: 127.0.0.1 | user_id: <nil> | ua: Go-http-client/1.1
|
||||
2026/03/27 18:20:09 [API] 2026-03-27 18:20:09 POST /api/v1/auth/login | status: 429 | latency: 0s | ip: 127.0.0.1 | user_id: <nil> | ua: Go-http-client/1.1
|
||||
2026/03/27 18:20:09 [API] 2026-03-27 18:20:09 POST /api/v1/auth/login | status: 429 | latency: 0s | ip: 127.0.0.1 | user_id: <nil> | ua: Go-http-client/1.1
|
||||
2026/03/27 18:20:09 [API] 2026-03-27 18:20:09 POST /api/v1/auth/login | status: 429 | latency: 0s | ip: 127.0.0.1 | user_id: <nil> | ua: Go-http-client/1.1
|
||||
2026/03/27 18:20:09 [API] 2026-03-27 18:20:09 POST /api/v1/auth/login | status: 429 | latency: 0s | ip: 127.0.0.1 | user_id: <nil> | ua: Go-http-client/1.1
|
||||
2026/03/27 18:20:09 [API] 2026-03-27 18:20:09 POST /api/v1/auth/login | status: 429 | latency: 0s | ip: 127.0.0.1 | user_id: <nil> | ua: Go-http-client/1.1
|
||||
2026/03/27 18:20:09 [API] 2026-03-27 18:20:09 POST /api/v1/auth/login | status: 429 | latency: 0s | ip: 127.0.0.1 | user_id: <nil> | ua: Go-http-client/1.1
|
||||
2026/03/27 18:20:09 [API] 2026-03-27 18:20:09 POST /api/v1/auth/login | status: 429 | latency: 0s | ip: 127.0.0.1 | user_id: <nil> | ua: Go-http-client/1.1
|
||||
2026/03/27 18:20:09 [API] 2026-03-27 18:20:09 POST /api/v1/auth/login | status: 429 | latency: 0s | ip: 127.0.0.1 | user_id: <nil> | ua: Go-http-client/1.1
|
||||
2026/03/27 18:20:09 [API] 2026-03-27 18:20:09 POST /api/v1/auth/login | status: 429 | latency: 0s | ip: 127.0.0.1 | user_id: <nil> | ua: Go-http-client/1.1
|
||||
2026/03/27 18:20:09 [API] 2026-03-27 18:20:09 POST /api/v1/auth/login | status: 429 | latency: 0s | ip: 127.0.0.1 | user_id: <nil> | ua: Go-http-client/1.1
|
||||
2026/03/27 18:20:09 [API] 2026-03-27 18:20:09 POST /api/v1/auth/login | status: 429 | latency: 0s | ip: 127.0.0.1 | user_id: <nil> | ua: Go-http-client/1.1
|
||||
2026/03/27 18:20:09 [API] 2026-03-27 18:20:09 POST /api/v1/auth/login | status: 429 | latency: 0s | ip: 127.0.0.1 | user_id: <nil> | ua: Go-http-client/1.1
|
||||
2026/03/27 18:20:09 [API] 2026-03-27 18:20:09 POST /api/v1/auth/login | status: 429 | latency: 0s | ip: 127.0.0.1 | user_id: <nil> | ua: Go-http-client/1.1
|
||||
2026/03/27 18:20:09 [API] 2026-03-27 18:20:09 POST /api/v1/auth/login | status: 200 | latency: 109.2177ms | ip: 127.0.0.1 | user_id: <nil> | ua: Go-http-client/1.1
|
||||
2026/03/27 18:20:09 [API] 2026-03-27 18:20:09 POST /api/v1/auth/login | status: 200 | latency: 116.7157ms | ip: 127.0.0.1 | user_id: <nil> | ua: Go-http-client/1.1
|
||||
e2e_test.go:397: 并发登录结果: 成功=2 失败=18 状态码分布=map[200:2 429:18] 总耗时=117.7617ms 平均=13.83308ms
|
||||
--- PASS: TestE2EConcurrentLogin (0.24s)
|
||||
PASS
|
||||
ok github.com/user-management-system/internal/e2e 0.520s
|
||||
@@ -0,0 +1,34 @@
|
||||
|
||||
> admin@0.0.0 e2e:auth-smoke:win
|
||||
> powershell -ExecutionPolicy Bypass -File ./scripts/run-cdp-auth-smoke.ps1
|
||||
|
||||
CDP browser: C:\Users\Admin\AppData\Local\ms-playwright\chromium_headless_shell-1208\chrome-headless-shell-win64\chrome-headless-shell.exe
|
||||
CDP endpoint ready: http://127.0.0.1:64521/json/version
|
||||
Launching command: node ./scripts/run-cdp-smoke.mjs
|
||||
CDP smoke completed successfully
|
||||
browser: HeadlessChrome/145.0.7632.6
|
||||
title: 用户管理系统
|
||||
capabilities: password=true email=false sms=false passwordReset=false
|
||||
tabs:
|
||||
forgot-password path: disabled
|
||||
protected dashboard redirect: /login (from=/dashboard)
|
||||
protected users redirect: /login (from=/users)
|
||||
pre-login users redirect from: /users
|
||||
login landing path: /users
|
||||
user detail title: 用户详情
|
||||
assign roles title: 分配角色 - e2e_admin
|
||||
roles path: /roles
|
||||
permissions title: 分配权限 - 管理员
|
||||
dashboard path: /dashboard
|
||||
logout path: /login
|
||||
post-logout dashboard redirect: /login (from=/dashboard)
|
||||
post-logout users redirect: /login (from=/users)
|
||||
responsive:
|
||||
- desktop: innerWidth=1920, bodyScrollWidth=1920
|
||||
- tablet: innerWidth=768, bodyScrollWidth=768
|
||||
- mobile: innerWidth=375, bodyScrollWidth=375
|
||||
load timings:
|
||||
- login-initial: 99ms
|
||||
- login-desktop: 186ms
|
||||
- login-tablet: 117ms
|
||||
- login-mobile: 96ms
|
||||
@@ -0,0 +1 @@
|
||||
npm warn Unknown user config "//git@github.com/" (git config --global url."https://github.com/".insteadOf ssh://git@github.com/). This will stop working in the next major version of npm.
|
||||
Reference in New Issue
Block a user