pytorch / cppdocs
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 238 units with 2,205 lines of code in units (0.2% of code).
    • 0 very complex units (0 lines of code)
    • 3 complex units (245 lines of code)
    • 6 medium complex units (310 lines of code)
    • 16 simple units (286 lines of code)
    • 213 very simple units (1,364 lines of code)
0% | 11% | 14% | 12% | 61%
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
js0% | 11% | 14% | 12% | 61%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
_static0% | 17% | 18% | 9% | 54%
_static/js0% | 0% | 7% | 17% | 75%
_static/collapsible-lists/js0% | 0% | 0% | 31% | 68%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
58 41 3
111 29 1
76 28 4
102 20 1
63 16 1
54 15 2
55 15 0
20 12 1
16 11 3
25 9 3
30 9 0
11 9 4
11 9 3
13 9 1
12 8 1
40 8 2
7 7 2
32 6 0
6 6 0
18 6 1
28 6 0
11 6 1
2 6 4
18 6 1
22 6 2
19 5 2
14 5 1
15 5 2
40 5 0
22 5 1
12 5 1
4 5 3
7 5 1
12 5 3
15 5 3
5 5 1
25 5 2
14 5 1
17 5 1
19 4 3
9 4 2
9 4 3
7 4 0
14 4 1
16 4 1
18 4 0
12 3 1
10 3 2
10 3 0
13 3 2