Machine learningSoftware Metrics
Cyclomatic Complexity
Cyclomatic Complexity (CC), introduced by Thomas McCabe in 1976, is a quantitative metric measuring the number of linearly independent paths through a function's control-flow graph. A function with high cyclomatic complexity is harder to understand, test, and maintain; McCabe advocated a threshold of 10 as the complexity limit for maintainability.
Open in MethodMindSoonVideoSoon
Read the full method
Members only
Sign inSign in with a free account to read this section.
Sources
- McCabe, T. J. (1976). A complexity measure. IEEE Transactions on Software Engineering, SE-2(4), 308–320. DOI: 10.1109/TSE.1976.233837 ↗
- Campbell, G. H. (1986). Defining a good metric, a software testing perspective. ASQ Software Quality Conference. link ↗
- Nagy, C., & Kriebel, K. (2001). Achieving optimal complexity and reliability. SAMS Publishing. ISBN: 0672322285