chore: update project documentation, audit reports, and initialize IDE configuration files
Some checks failed
CI / Lint → Typecheck → Test → Build (22) (push) Failing after 29s
CI / E2E Tests (push) Has been skipped
CodeQL Analysis / CodeQL (javascript-typescript) (push) Failing after 2m42s
Deploy / Build Web Image (push) Failing after 27s
Deploy / Build AI Services Image (push) Failing after 29s
E2E Tests / Playwright E2E (push) Failing after 43s
Deploy / Build API Image (push) Failing after 1m31s
Security Scanning / Dependency Audit (pnpm) (push) Failing after 6s
Security Scanning / Trivy Scan — API Image (push) Failing after 5m35s
Security Scanning / Trivy Scan — AI Services Image (push) Failing after 3m45s
Deploy / Deploy to Staging (push) Has been skipped
Deploy / Smoke Test Staging (push) Has been skipped
Deploy / Deploy to Production (push) Has been skipped
Deploy / Smoke Test Production (push) Has been skipped
Deploy / Rollback Staging (push) Has been skipped
Deploy / Rollback Production (push) Has been skipped
Security Scanning / Trivy Scan — Web Image (push) Failing after 13m51s
Security Scanning / Trivy Filesystem Scan (push) Failing after 14m46s
Security Scanning / Security Gate (push) Has been cancelled
Some checks failed
CI / Lint → Typecheck → Test → Build (22) (push) Failing after 29s
CI / E2E Tests (push) Has been skipped
CodeQL Analysis / CodeQL (javascript-typescript) (push) Failing after 2m42s
Deploy / Build Web Image (push) Failing after 27s
Deploy / Build AI Services Image (push) Failing after 29s
E2E Tests / Playwright E2E (push) Failing after 43s
Deploy / Build API Image (push) Failing after 1m31s
Security Scanning / Dependency Audit (pnpm) (push) Failing after 6s
Security Scanning / Trivy Scan — API Image (push) Failing after 5m35s
Security Scanning / Trivy Scan — AI Services Image (push) Failing after 3m45s
Deploy / Deploy to Staging (push) Has been skipped
Deploy / Smoke Test Staging (push) Has been skipped
Deploy / Deploy to Production (push) Has been skipped
Deploy / Smoke Test Production (push) Has been skipped
Deploy / Rollback Staging (push) Has been skipped
Deploy / Rollback Production (push) Has been skipped
Security Scanning / Trivy Scan — Web Image (push) Failing after 13m51s
Security Scanning / Trivy Filesystem Scan (push) Failing after 14m46s
Security Scanning / Security Gate (push) Has been cancelled
This commit is contained in:
@@ -1,34 +1,34 @@
|
||||
# K6 Load Testing — Goodgo Platform
|
||||
|
||||
## Overview
|
||||
## Tổng quan
|
||||
|
||||
Performance load tests for critical API paths using [K6](https://k6.io/).
|
||||
Các bài load test hiệu năng cho những API path quan trọng, sử dụng [K6](https://k6.io/).
|
||||
|
||||
## Test Suites
|
||||
## Bộ kiểm thử
|
||||
|
||||
| Script | Target | Peak VUs | Duration |
|
||||
|--------|--------|----------|----------|
|
||||
| `auth.js` | Login/Register | 100 | 2min |
|
||||
| `listings.js` | Search + Detail | 500 | 3min |
|
||||
| `search.js` | Text + Geo search | 200 | 3min |
|
||||
| `search-advanced.js` | Combined geo + text + filters, pagination | 300 | 3min |
|
||||
| `admin.js` | Moderation queue, dashboard, audit logs | 50 | 2.5min |
|
||||
| Script | Mục tiêu | VU đỉnh | Thời lượng |
|
||||
|--------|----------|---------|-----------|
|
||||
| `auth.js` | Đăng nhập/Đăng ký | 100 | 2min |
|
||||
| `listings.js` | Tìm kiếm + Chi tiết | 500 | 3min |
|
||||
| `search.js` | Tìm kiếm văn bản + Địa lý | 200 | 3min |
|
||||
| `search-advanced.js` | Kết hợp geo + text + bộ lọc, phân trang | 300 | 3min |
|
||||
| `admin.js` | Hàng đợi kiểm duyệt, bảng điều khiển, nhật ký audit | 50 | 2.5min |
|
||||
| `mcp.js` | MCP server discovery, property-search, valuation | 120 | 2.5min |
|
||||
| `payments.js` | Create + List | 50 | 2min |
|
||||
| `payments.js` | Tạo + Danh sách | 50 | 2min |
|
||||
|
||||
## SLA Thresholds
|
||||
## Ngưỡng SLA
|
||||
|
||||
| Metric | Threshold |
|
||||
|--------|-----------|
|
||||
| p50 latency | < 200ms |
|
||||
| p95 latency | < 500ms |
|
||||
| p99 latency | < 1000ms |
|
||||
| Error rate | < 1% |
|
||||
| Chỉ số | Ngưỡng |
|
||||
|--------|--------|
|
||||
| Độ trễ p50 | < 200ms |
|
||||
| Độ trễ p95 | < 500ms |
|
||||
| Độ trễ p99 | < 1000ms |
|
||||
| Tỷ lệ lỗi | < 1% |
|
||||
|
||||
### Per-Suite Custom Thresholds
|
||||
### Ngưỡng tuỳ chỉnh theo bộ kiểm thử
|
||||
|
||||
| Suite | Metric | Threshold |
|
||||
|-------|--------|-----------|
|
||||
| Bộ kiểm thử | Chỉ số | Ngưỡng |
|
||||
|-------------|--------|--------|
|
||||
| search-advanced | advanced_search_duration p95 | < 800ms |
|
||||
| search-advanced | geo_filter_search_duration p95 | < 800ms |
|
||||
| admin | moderation_action_duration p95 | < 800ms |
|
||||
@@ -37,21 +37,21 @@ Performance load tests for critical API paths using [K6](https://k6.io/).
|
||||
| mcp | mcp_valuation_duration p95 | < 1000ms |
|
||||
| mcp | mcp_batch_valuation_duration p95 | < 2000ms |
|
||||
|
||||
## Prerequisites
|
||||
## Điều kiện tiên quyết
|
||||
|
||||
```bash
|
||||
# Install K6
|
||||
# Cài đặt K6
|
||||
brew install k6 # macOS
|
||||
# or: https://grafana.com/docs/k6/latest/set-up/install-k6/
|
||||
# hoặc: https://grafana.com/docs/k6/latest/set-up/install-k6/
|
||||
|
||||
# Start the API
|
||||
# Khởi động API
|
||||
pnpm --filter @goodgo/api run dev
|
||||
```
|
||||
|
||||
## Running Tests
|
||||
## Chạy kiểm thử
|
||||
|
||||
```bash
|
||||
# Run individual suite
|
||||
# Chạy từng bộ kiểm thử riêng lẻ
|
||||
k6 run load-tests/scripts/auth.js
|
||||
k6 run load-tests/scripts/listings.js
|
||||
k6 run load-tests/scripts/search.js
|
||||
@@ -60,36 +60,36 @@ k6 run load-tests/scripts/admin.js
|
||||
k6 run load-tests/scripts/mcp.js
|
||||
k6 run load-tests/scripts/payments.js
|
||||
|
||||
# Run against a custom API URL
|
||||
# Chạy với URL API tuỳ chỉnh
|
||||
k6 run -e API_BASE_URL=https://staging.goodgo.vn load-tests/scripts/auth.js
|
||||
|
||||
# Run all suites sequentially
|
||||
# Chạy tất cả các bộ kiểm thử tuần tự
|
||||
for f in load-tests/scripts/*.js; do k6 run "$f"; done
|
||||
|
||||
# Export results as JSON
|
||||
# Xuất kết quả dưới dạng JSON
|
||||
k6 run --out json=results/auth.json load-tests/scripts/auth.js
|
||||
```
|
||||
|
||||
## CI Integration
|
||||
## Tích hợp CI
|
||||
|
||||
The `load-test.yml` workflow runs as an optional manual stage in GitHub Actions.
|
||||
Trigger via `workflow_dispatch` with a suite selector.
|
||||
Workflow `load-test.yml` chạy như một giai đoạn thủ công tuỳ chọn trong GitHub Actions.
|
||||
Kích hoạt qua `workflow_dispatch` với bộ chọn suite.
|
||||
|
||||
## Directory Structure
|
||||
## Cấu trúc thư mục
|
||||
|
||||
```
|
||||
load-tests/
|
||||
├── lib/
|
||||
│ └── config.js # Shared config, helpers, SLA thresholds
|
||||
│ └── config.js # Cấu hình dùng chung, helper, ngưỡng SLA
|
||||
├── scripts/
|
||||
│ ├── auth.js # Auth flow load tests
|
||||
│ ├── listings.js # Listings search + detail
|
||||
│ ├── search.js # Full-text + geo search (basic)
|
||||
│ ├── search-advanced.js # Combined geo + text + filter search
|
||||
│ ├── admin.js # Admin moderation, dashboard, audit
|
||||
│ ├── mcp.js # MCP server endpoints (property-search, valuation)
|
||||
│ └── payments.js # Payment creation + listing
|
||||
│ ├── auth.js # Load test luồng xác thực
|
||||
│ ├── listings.js # Tìm kiếm + chi tiết listings
|
||||
│ ├── search.js # Tìm kiếm full-text + geo (cơ bản)
|
||||
│ ├── search-advanced.js # Tìm kiếm kết hợp geo + text + bộ lọc
|
||||
│ ├── admin.js # Kiểm duyệt admin, bảng điều khiển, audit
|
||||
│ ├── mcp.js # Endpoint MCP server (property-search, valuation)
|
||||
│ └── payments.js # Tạo và liệt kê thanh toán
|
||||
├── results/
|
||||
│ └── BASELINE-REPORT.md # Baseline performance report
|
||||
│ └── BASELINE-REPORT.md # Báo cáo hiệu năng baseline
|
||||
└── README.md
|
||||
```
|
||||
|
||||
@@ -1,137 +1,137 @@
|
||||
# K6 Baseline Load Test Report
|
||||
# Báo Cáo Kiểm Thử Tải K6 Baseline
|
||||
|
||||
**Date:** 2026-04-09
|
||||
**Environment:** Local dev (macOS, localhost:3001)
|
||||
**K6 Version:** v1.7.1
|
||||
**API Status:** Running (NestJS dev mode)
|
||||
**Ngày:** 2026-04-09
|
||||
**Môi trường:** Dev cục bộ (macOS, localhost:3001)
|
||||
**Phiên bản K6:** v1.7.1
|
||||
**Trạng thái API:** Đang chạy (NestJS chế độ dev)
|
||||
|
||||
## Executive Summary
|
||||
## Tóm Tắt Điều Hành
|
||||
|
||||
All four K6 test suites executed successfully. Latency metrics are excellent across all endpoints — well within SLA thresholds. However, functional correctness is impacted by dev environment limitations (auth endpoints return 500 due to database/dependency issues, Typesense unavailable for search).
|
||||
Tất cả bốn bộ kiểm thử K6 đã thực thi thành công. Các chỉ số độ trễ rất tốt trên tất cả các endpoint — nằm trong ngưỡng SLA cho phép. Tuy nhiên, tính đúng đắn về mặt chức năng bị ảnh hưởng bởi các giới hạn của môi trường dev (các endpoint xác thực trả về 500 do sự cố cơ sở dữ liệu/dependency, Typesense không khả dụng cho tìm kiếm).
|
||||
|
||||
**Key finding:** The API server handles high concurrency well at the network/framework level. Actual business logic performance needs re-validation once backend dependencies (PostgreSQL + Prisma, Typesense, VNPay) are fully operational.
|
||||
**Phát hiện chính:** Server API xử lý concurrency cao tốt ở tầng mạng/framework. Hiệu năng logic nghiệp vụ thực tế cần được xác nhận lại khi các dependency backend (PostgreSQL + Prisma, Typesense, VNPay) đã hoạt động đầy đủ.
|
||||
|
||||
## SLA Thresholds (from config)
|
||||
## Ngưỡng SLA (từ cấu hình)
|
||||
|
||||
| Metric | Target | Status |
|
||||
|--------|--------|--------|
|
||||
| p50 latency | < 200ms | **PASS** (all suites < 3ms) |
|
||||
| p95 latency | < 500ms | **PASS** (all suites < 6ms) |
|
||||
| p99 latency | < 1000ms | **PASS** (all suites < 19ms) |
|
||||
| Error rate | < 1% | **FAIL** (auth/listings/payments return 500) |
|
||||
| Chỉ số | Mục tiêu | Trạng thái |
|
||||
|--------|----------|------------|
|
||||
| p50 latency | < 200ms | **ĐẠT** (tất cả bộ kiểm thử < 3ms) |
|
||||
| p95 latency | < 500ms | **ĐẠT** (tất cả bộ kiểm thử < 6ms) |
|
||||
| p99 latency | < 1000ms | **ĐẠT** (tất cả bộ kiểm thử < 19ms) |
|
||||
| Error rate | < 1% | **KHÔNG ĐẠT** (auth/listings/payments trả về 500) |
|
||||
|
||||
## Detailed Results
|
||||
## Kết Quả Chi Tiết
|
||||
|
||||
### 1. Auth Suite (auth.js)
|
||||
### 1. Bộ Kiểm Thử Auth (auth.js)
|
||||
|
||||
| Metric | Value |
|
||||
|--------|-------|
|
||||
| Chỉ số | Giá trị |
|
||||
|--------|---------|
|
||||
| Peak VUs | 100 |
|
||||
| Duration | 2m (ramp 30s → sustain 1m → ramp-down 30s) |
|
||||
| Total Requests | 4,572 |
|
||||
| Throughput | 37.6 req/s |
|
||||
| p50 latency | 2.12ms |
|
||||
| p95 latency | 5.24ms |
|
||||
| p99 latency | 9.12ms |
|
||||
| Error Rate | 100% (HTTP 500 — internal server error) |
|
||||
| Data Received | 7.6 MB (62 kB/s) |
|
||||
| Total Requests | 4.572 |
|
||||
| Throughput | 37,6 req/s |
|
||||
| p50 latency | 2,12ms |
|
||||
| p95 latency | 5,24ms |
|
||||
| p99 latency | 9,12ms |
|
||||
| Error Rate | 100% (HTTP 500 — lỗi server nội bộ) |
|
||||
| Data Received | 7,6 MB (62 kB/s) |
|
||||
|
||||
**Notes:**
|
||||
- Register endpoint (`POST /auth/register`) returns 500 — likely Prisma/DB connection issue in dev
|
||||
- Login tests could not run (no users in pool due to failed registration)
|
||||
- Latency baseline is solid — the framework + routing layer responds fast
|
||||
**Ghi chú:**
|
||||
- Endpoint đăng ký (`POST /auth/register`) trả về 500 — có thể do sự cố kết nối Prisma/DB trong môi trường dev
|
||||
- Các bài kiểm thử đăng nhập không thể chạy (không có người dùng trong pool do đăng ký thất bại)
|
||||
- Baseline độ trễ ổn định — tầng framework + routing phản hồi nhanh
|
||||
|
||||
### 2. Listings Suite (listings.js)
|
||||
### 2. Bộ Kiểm Thử Listings (listings.js)
|
||||
|
||||
| Metric | Value |
|
||||
|--------|-------|
|
||||
| Chỉ số | Giá trị |
|
||||
|--------|---------|
|
||||
| Peak VUs | 500 |
|
||||
| Duration | 3m (ramp 30s → sustain 2m → ramp-down 30s) |
|
||||
| Total Requests | 56,347 |
|
||||
| Throughput | 311.7 req/s |
|
||||
| p50 latency | 0.55ms |
|
||||
| p95 latency | 2.37ms |
|
||||
| p99 latency | 4.24ms |
|
||||
| Total Requests | 56.347 |
|
||||
| Throughput | 311,7 req/s |
|
||||
| p50 latency | 0,55ms |
|
||||
| p95 latency | 2,37ms |
|
||||
| p99 latency | 4,24ms |
|
||||
| Error Rate | 100% (HTTP 500) |
|
||||
| Data Received | 68 MB (377 kB/s) |
|
||||
|
||||
**Notes:**
|
||||
- Highest throughput of all suites (311 req/s at 500 VUs)
|
||||
- Sub-millisecond p50 indicates very fast error responses
|
||||
- Detail endpoint not tested (no listings created in setup)
|
||||
- Need to re-test with seeded DB data for realistic benchmarks
|
||||
**Ghi chú:**
|
||||
- Throughput cao nhất trong tất cả các bộ kiểm thử (311 req/s ở 500 VUs)
|
||||
- p50 dưới mili-giây cho thấy phản hồi lỗi rất nhanh
|
||||
- Endpoint chi tiết không được kiểm thử (không có listings nào được tạo trong bước setup)
|
||||
- Cần kiểm thử lại với dữ liệu DB đã được seed để có benchmark thực tế
|
||||
|
||||
### 3. Search Suite (search.js)
|
||||
### 3. Bộ Kiểm Thử Search (search.js)
|
||||
|
||||
| Metric | Value |
|
||||
|--------|-------|
|
||||
| Chỉ số | Giá trị |
|
||||
|--------|---------|
|
||||
| Peak VUs | 200 |
|
||||
| Duration | 3m (ramp 30s → sustain 2m → ramp-down 30s) |
|
||||
| Total Requests | 18,743 |
|
||||
| Throughput | 103.7 req/s |
|
||||
| p50 latency | 1.27ms |
|
||||
| p95 latency | 2.59ms |
|
||||
| p99 latency | 4.57ms |
|
||||
| Error Rate | 0% (503 responses treated as acceptable) |
|
||||
| Total Requests | 18.743 |
|
||||
| Throughput | 103,7 req/s |
|
||||
| p50 latency | 1,27ms |
|
||||
| p95 latency | 2,59ms |
|
||||
| p99 latency | 4,57ms |
|
||||
| Error Rate | 0% (phản hồi 503 được coi là chấp nhận được) |
|
||||
| Data Received | 155 MB (856 kB/s) |
|
||||
|
||||
**Notes:**
|
||||
- Text search: p95 = 2.65ms, Geo search: p95 = 2.55ms
|
||||
- HTTP error rate 0% (503 from Typesense is expected in dev without Typesense running)
|
||||
- Response validation fails (no `data` field in 503 responses) — expected
|
||||
- Fixed `URLSearchParams` K6 compatibility issue during this test run
|
||||
**Ghi chú:**
|
||||
- Tìm kiếm văn bản: p95 = 2,65ms, Tìm kiếm địa lý: p95 = 2,55ms
|
||||
- Tỷ lệ lỗi HTTP 0% (503 từ Typesense là dự kiến trong môi trường dev khi không chạy Typesense)
|
||||
- Xác thực phản hồi thất bại (không có trường `data` trong các phản hồi 503) — dự kiến
|
||||
- Đã sửa sự cố tương thích K6 với `URLSearchParams` trong lần chạy kiểm thử này
|
||||
|
||||
### 4. Payments Suite (payments.js)
|
||||
### 4. Bộ Kiểm Thử Payments (payments.js)
|
||||
|
||||
| Metric | Value |
|
||||
|--------|-------|
|
||||
| Chỉ số | Giá trị |
|
||||
|--------|---------|
|
||||
| Peak VUs | 50 |
|
||||
| Duration | 2m (ramp 30s → sustain 1m → ramp-down 30s) |
|
||||
| Total Requests | 20 |
|
||||
| Throughput | 0.17 req/s |
|
||||
| p50 latency | 1.31ms |
|
||||
| p95 latency | 5.76ms |
|
||||
| p99 latency | 18.77ms |
|
||||
| Error Rate | 100% (setup registration failed) |
|
||||
| Throughput | 0,17 req/s |
|
||||
| p50 latency | 1,31ms |
|
||||
| p95 latency | 5,76ms |
|
||||
| p99 latency | 18,77ms |
|
||||
| Error Rate | 100% (đăng ký trong bước setup thất bại) |
|
||||
| Data Received | 33 kB |
|
||||
|
||||
**Notes:**
|
||||
- Very low request count (20) because setup failed to register users
|
||||
- Without auth tokens, payment VUs exit immediately
|
||||
- p99 at 18.77ms is the highest across suites — suggests payment endpoint has more processing overhead
|
||||
- Need auth working before meaningful payment benchmarks
|
||||
**Ghi chú:**
|
||||
- Số lượng request rất thấp (20) vì bước setup đăng ký người dùng thất bại
|
||||
- Không có auth token, các VU thanh toán thoát ngay lập tức
|
||||
- p99 ở mức 18,77ms là cao nhất trong các bộ kiểm thử — cho thấy endpoint thanh toán có overhead xử lý nhiều hơn
|
||||
- Cần auth hoạt động trước khi có thể thực hiện benchmark thanh toán có ý nghĩa
|
||||
|
||||
## Bottlenecks Identified
|
||||
## Các Điểm Nghẽn Được Xác Định
|
||||
|
||||
1. **Auth/Registration (Critical):** `POST /auth/register` returns 500 — blocks all authenticated test flows. Root cause: likely Prisma client not connecting to PostgreSQL or missing migration state.
|
||||
2. **Typesense Unavailable:** Search returns 503 — expected for local dev without Typesense service. Tests correctly handle this with fallback checks.
|
||||
3. **K6 Compatibility:** `search.js` used `URLSearchParams` (not available in K6 runtime) — **fixed** by replacing with string interpolation.
|
||||
4. **Payment Gateway:** VNPay integration returns errors in dev — expected, tests accept 502/503 as valid.
|
||||
1. **Auth/Đăng ký (Nghiêm trọng):** `POST /auth/register` trả về 500 — chặn tất cả các luồng kiểm thử yêu cầu xác thực. Nguyên nhân gốc rễ: có thể Prisma client không kết nối được với PostgreSQL hoặc thiếu trạng thái migration.
|
||||
2. **Typesense Không Khả Dụng:** Search trả về 503 — dự kiến trong môi trường dev cục bộ khi không có service Typesense. Các bài kiểm thử xử lý đúng điều này với các kiểm tra dự phòng.
|
||||
3. **Tương Thích K6:** `search.js` sử dụng `URLSearchParams` (không có trong runtime K6) — **đã sửa** bằng cách thay thế bằng string interpolation.
|
||||
4. **Payment Gateway:** Tích hợp VNPay trả về lỗi trong môi trường dev — dự kiến, các bài kiểm thử chấp nhận 502/503 là hợp lệ.
|
||||
|
||||
## Baseline Benchmarks (Framework-Level)
|
||||
## Benchmark Baseline (Tầng Framework)
|
||||
|
||||
These numbers represent the NestJS framework + routing layer performance (error responses), not full business logic:
|
||||
Các con số này thể hiện hiệu năng tầng framework NestJS + routing (phản hồi lỗi), không phải logic nghiệp vụ đầy đủ:
|
||||
|
||||
| Endpoint Category | p50 | p95 | p99 | Max RPS |
|
||||
|-------------------|-----|-----|-----|---------|
|
||||
| Auth (register/login) | 2.12ms | 5.24ms | 9.12ms | ~38/s |
|
||||
| Listings (search/detail) | 0.55ms | 2.37ms | 4.24ms | ~312/s |
|
||||
| Search (text/geo) | 1.27ms | 2.59ms | 4.57ms | ~104/s |
|
||||
| Payments (create/list) | 1.31ms | 5.76ms | 18.77ms | ~0.2/s* |
|
||||
| Nhóm Endpoint | p50 | p95 | p99 | Max RPS |
|
||||
|---------------|-----|-----|-----|---------|
|
||||
| Auth (register/login) | 2,12ms | 5,24ms | 9,12ms | ~38/s |
|
||||
| Listings (search/detail) | 0,55ms | 2,37ms | 4,24ms | ~312/s |
|
||||
| Search (text/geo) | 1,27ms | 2,59ms | 4,57ms | ~104/s |
|
||||
| Payments (create/list) | 1,31ms | 5,76ms | 18,77ms | ~0,2/s* |
|
||||
|
||||
*Payments throughput is artificially low due to setup failure.
|
||||
*Throughput của Payments thấp bất thường do lỗi setup.
|
||||
|
||||
## Recommendations
|
||||
## Khuyến Nghị
|
||||
|
||||
1. **Re-run with full backend:** Set up PostgreSQL + seed data, start Redis, and optionally Typesense before re-running to get business-logic-level benchmarks.
|
||||
2. **CI integration:** Wire `load-test.yml` GitHub Actions workflow to run against a staging environment with real data.
|
||||
3. **Performance regression alerts:** Set thresholds in CI — fail the pipeline if p95 > 500ms or error rate > 5%.
|
||||
4. **Grafana dashboards:** Export K6 results to Grafana Cloud or InfluxDB for historical tracking.
|
||||
5. **Increase payment VUs:** Once auth works, test payments at 100+ VUs to find gateway bottlenecks.
|
||||
1. **Chạy lại với backend đầy đủ:** Thiết lập PostgreSQL + seed dữ liệu, khởi động Redis, và tùy chọn Typesense trước khi chạy lại để có benchmark ở mức logic nghiệp vụ.
|
||||
2. **Tích hợp CI:** Kết nối workflow GitHub Actions `load-test.yml` để chạy trên môi trường staging với dữ liệu thực.
|
||||
3. **Cảnh báo hồi quy hiệu năng:** Đặt ngưỡng trong CI — fail pipeline nếu p95 > 500ms hoặc error rate > 5%.
|
||||
4. **Dashboard Grafana:** Xuất kết quả K6 sang Grafana Cloud hoặc InfluxDB để theo dõi lịch sử.
|
||||
5. **Tăng VUs cho payments:** Khi auth hoạt động, kiểm thử payments ở 100+ VUs để tìm điểm nghẽn của gateway.
|
||||
|
||||
## Files Generated
|
||||
## Các Tệp Được Tạo
|
||||
|
||||
- `load-tests/results/auth.json` — Raw K6 JSON output
|
||||
- `load-tests/results/listings.json` — Raw K6 JSON output
|
||||
- `load-tests/results/search.json` — Raw K6 JSON output
|
||||
- `load-tests/results/payments.json` — Raw K6 JSON output
|
||||
- `load-tests/results/auth.json` — Dữ liệu JSON thô từ K6
|
||||
- `load-tests/results/listings.json` — Dữ liệu JSON thô từ K6
|
||||
- `load-tests/results/search.json` — Dữ liệu JSON thô từ K6
|
||||
- `load-tests/results/payments.json` — Dữ liệu JSON thô từ K6
|
||||
|
||||
Reference in New Issue
Block a user