Files
maestro/src/model
wangjia 3696604e13 feat: 指标统计(执行时长/成功率/复审通过率/重试率/额度估算)tsk_lDx6zd-EbA00
从 runs/tasks/events 聚合健康度与成本指标,看板新增指标小面板。

- Store.metrics(projectId?):执行时长(avg/p50/p95,未结束与负时长不计)、
  executor 成功率、复审/安全 verdict 通过率、failed→queued 重试率 +
  needs_attention、按模型额度粗估(时长×档位权重,标注估算)
- src/model/metrics.ts:类型 + 纯函数(percentile/ratio/estimateCostUnits/emptyMetrics)
- API:GET /api/metrics?project=
- web:归档区上方指标面板(数字卡 + 按模型分布),失败/空数据静默隐藏
- test/metrics.test.ts:9 个用例(纯函数/空数据/时长/成功率/复审/重试/按模型/项目过滤)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 10:55:56 +08:00
..