openai / spinningup
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 290 units with 3,078 lines of code in units (79.4% of code).
    • 0 very complex units (0 lines of code)
    • 5 complex units (528 lines of code)
    • 12 medium complex units (951 lines of code)
    • 11 simple units (207 lines of code)
    • 262 very simple units (1,392 lines of code)
0% | 17% | 30% | 6% | 45%
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
py0% | 17% | 30% | 6% | 45%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
spinup0% | 17% | 30% | 6% | 45%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
68 35 2
121 33 3
119 27 3
118 26 3
102 26 3
103 22 3
107 21 3
109 20 3
95 20 3
29 19 4
91 18 3
95 17 3
79 16 3
108 16 3
98 16 3
19 15 2
18 13 1
9 8 1
25 8 1
33 8 2
19 8 4
25 7 1
18 7 4
22 7 1
14 7 5
15 6 4
17 6 6
10 6 2
12 5 5
5 5 2
11 5 3
12 5 2
11 5 4
5 5 2
12 5 4
11 5 4
13 4 3
13 4 5
10 4 10
16 4 2
11 4 2
17 4 4
6 4 3
6 4 3
30 3 7
6 3 2
7 3 1
6 3 1
6 3 2
7 3 4