知识卡片
复杂度指标只量到路径
圈复杂度按代码控制流的独立路径估计复杂程度。单函数简式为 CC=E-N+2;原书无分支函数为1、一处分支为2,示例函数为3。它能提示难测或难改的函数,却不能判断复杂性来自业务本身还是糟糕拆分;阈值也须依领域与代码结构解释。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- Measuring and Governing Architecture Characteristics · 查看原书依据
While it measures the complexity of code, it cannot determine whether that complexity is essential
参考来源
- 位置:《Fundamentals of Software Architecture》第08章《Measuring and Governing Architecture Characteristics》(源文件:`OEBPS/ch06.html`)
- 结论依据:原文给出圈复杂度计算及其无法分辨必要和偶然复杂度的边界。
- 原始内容:While it measures the complexity of code, it cannot determine whether that complexity is essential