fix(usage): 统一用户排行榜 Token 统计口径

- 将用户排行榜 Tokens 调整为与仪表盘今日 Token 一致
- 统一 effective input、cache creation fallback、cache read 计算规则
- 补齐 Postgres 聚合、admin 内存构建和内存仓库回退路径
- 增加缓存命中场景的统计口径测试
This commit is contained in:
AAEE86
2026-05-11 22:34:37 +08:00
parent e16a225eb3
commit bfbf7a4663
8 changed files with 133 additions and 54 deletions
@@ -1104,7 +1104,7 @@ mod tests {
.expect("dashboard summary should load");
assert_eq!(summary.total_requests, 2);
assert_eq!(summary.error_requests, 1);
assert_eq!(summary.total_tokens, 14);
assert_eq!(summary.total_tokens, 10);
}
async fn seed_stats_targets(