openai / kubernetes
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 43,398 units with 503,708 lines of code in units (69.0% of code).
    • 35 very complex units (11,483 lines of code)
    • 199 complex units (24,571 lines of code)
    • 1,450 medium complex units (83,250 lines of code)
    • 3,481 simple units (96,492 lines of code)
    • 38,233 very simple units (287,912 lines of code)
2% | 4% | 16% | 19% | 57%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
go2% | 4% | 16% | 19% | 57%
py0% | 0% | 31% | 31% | 37%
c0% | 0% | 0% | 28% | 71%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
pkg3% | 5% | 17% | 22% | 52%
staging1% | 4% | 15% | 15% | 61%
cmd2% | 2% | 18% | 24% | 52%
plugin0% | 0% | 24% | 34% | 41%
hack0% | 0% | 28% | 32% | 38%
cluster0% | 0% | 0% | 39% | 60%
build0% | 0% | 0% | 52% | 47%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
1687 842 1
273 135 1
718 132 1
309 129 2
242 113 6
480 107 1
359 105 1
243 95 5
545 95 1
464 94 1
514 89 1
280 83 5
241 82 1
146 80 3
207 73 1
256 69 5
305 66 4
393 66 1
267 65 4
595 65 26
187 63 1
181 63 5
170 61 2
193 59 1
250 59 1
228 58 2
127 57 4
226 56 1
232 55 1
191 52 0
217 52 1
218 52 1
160 51 2
158 51 1
221 51 1
187 49 4
114 49 2
205 49 1
151 49 3
177 47 1
174 47 1
143 47 1
108 46 1
155 46 3
102 46 2
121 46 1
143 46 1
235 46 1
156 46 2
218 45 1