1.2 KiB
1.2 KiB
DORA 指标(CFR)落地说明(P13-7)
更新时间:2026-02-12
指标口径
run_cfr = failed_runs / total_runscommit_cfr = failed_commits / total_commitsfailed_commit判定:- 对应回归 run 失败;或
- 该 commit 在回归时间后 24 小时内出现热修记录。
数据输入
- 回归 JSON:来自
server/scripts/regression-all.sh --json-report - 可选热修 CSV:
commit_sha,occurred_at
生成命令
python3 scripts/cfr_report.py \
--input-dir artifacts/regression \
--window 7d,30d \
--output-json /tmp/cfr.json \
--output-md /tmp/cfr.md
带热修记录:
python3 scripts/cfr_report.py \
--input-dir artifacts/regression \
--window 30d \
--hotfix-csv data/hotfix-events.csv \
--output-json /tmp/cfr.json
输出结构(JSON)
generated_atinput_dirreports_scannedhotfix_eventswindows.<Nd>.{total_runs,failed_runs,run_cfr,run_cfr_pct,total_commits,failed_commits,commit_cfr,commit_cfr_pct}
使用建议
- 周报使用
7d,月报使用30d。 - 当
commit_cfr_pct持续高于阈值(例如 15%)时,暂停高风险灰度并补回归样本。