pytorch / ci-hud
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 230 units with 3,847 lines of code in units (61.2% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (135 lines of code)
    • 9 medium complex units (609 lines of code)
    • 21 simple units (919 lines of code)
    • 199 very simple units (2,184 lines of code)
0% | 3% | 15% | 23% | 56%
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% | 3% | 16% | 24% | 55%
py0% | 0% | 0% | 14% | 85%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src0% | 4% | 14% | 21% | 59%
src/pr0% | 0% | 25% | 38% | 35%
scripts0% | 0% | 0% | 14% | 85%
src/components0% | 0% | 0% | 0% | 100%
src/utils0% | 0% | 0% | 0% | 100%
src/groups0% | 0% | 0% | 0% | 100%
src/status0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
135 31 0
93 23 0
137 21 1
39 16 1
39 15 1
86 14 0
44 14 1
44 13 1
32 12 2
95 12 0
84 10 2
25 10 2
119 9 0
51 9 0
28 8 1
19 8 1
97 8 0
24 7 2
36 7 0
17 7 1
27 7 1
32 6 1
24 6 0
40 6 0
19 6 2
77 6 1
52 6 0
21 6 2
18 6 0
79 6 1
30 6 0
24 5 2
22 5 2
19 5 0
9 5 2
15 5 3
12 5 0
47 5 1
53 5 0
30 5 0
23 5 2
45 5 1
18 5 1
21 5 1
5 4 2
8 4 1
15 4 2
3 4 1
15 4 1
42 4 1