fix(api): handle zero-baseline edge cases in trend calculation

Introduce `CalculateTrendFloatWithBaseline` to correctly handle scenarios where previous period metrics (Error Rate, Latency) are zero or missing. This prevents arithmetic errors and distinguishes between "new" data and actual increases ("up") when starting from zero.

Also updates the admin panel dashboard documentation to reflect current project status.
This commit is contained in:
zenfun
2026-01-02 23:17:55 +08:00
parent 481f616704
commit 5c01497ce0
3 changed files with 114 additions and 7 deletions

View File

@@ -1,4 +1,4 @@
# EZ-API 控制平面仪表盘 (Dashboard) 前后端对接功能文档
# EZ-API admin-panel Dashboard 功能文档
## 1. 文档概述
@@ -253,9 +253,8 @@
|--------|------|
| Mock 数据 | 前端可利用 Mock 数据先行开发 UI |
| Swagger 验证 | 复杂聚合接口建议先在 Swagger 中验证 |
| 自动化测试 | 利用 Mock Server 进行前端组件测试 |
| 性能监控 | 关注 traffic-chart 接口在大数据量下的响应时间 |
---
*注:本对接文档基于现有端点整理Billing 模块后端尚未实现。*
*注:本对接文档基于现有端点整理*