pytorch / audio
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 899 units with 9,925 lines of code in units (46.6% of code).
    • 0 very complex units (0 lines of code)
    • 2 complex units (271 lines of code)
    • 17 medium complex units (794 lines of code)
    • 45 simple units (1,247 lines of code)
    • 835 very simple units (7,613 lines of code)
0% | 2% | 8% | 12% | 76%
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
cpp0% | 7% | 10% | 20% | 61%
h0% | 0% | 15% | 12% | 71%
py0% | 0% | 4% | 7% | 88%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
torchaudio/csrc0% | 5% | 12% | 18% | 63%
torchaudio/backend0% | 0% | 31% | 12% | 56%
torchaudio/datasets0% | 0% | 13% | 3% | 82%
torchaudio/models0% | 0% | 2% | 5% | 91%
tools/setup_helpers0% | 0% | 54% | 0% | 45%
torchaudio/functional0% | 0% | 0% | 17% | 82%
tools0% | 0% | 0% | 31% | 68%
torchaudio0% | 0% | 0% | 5% | 94%
torchaudio/prototype0% | 0% | 0% | 15% | 84%
ROOT0% | 0% | 0% | 12% | 87%
torchaudio/pipelines0% | 0% | 0% | 1% | 98%
torchaudio/compliance0% | 0% | 0% | 0% | 100%
tools/release_notes0% | 0% | 0% | 0% | 100%
torchaudio/_internal0% | 0% | 0% | 0% | 100%
torchaudio/utils0% | 0% | 0% | 0% | 100%
torchaudio/sox_effects0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
101 34 4
170 33 3
82 24 4
83 23 17
60 19 9
45 18 2
63 18 1
41 17 3
48 17 1
34 15 2
32 14 1
30 13 1
67 13 8
25 12 1
68 12 7
20 12 2
20 12 4
42 11 3
34 11 3
41 10 6
42 10 1
30 10 5
29 10 3
28 10 3
36 9 1
32 9 2
32 9 4
38 9 1
53 9 8
13 9 1
31 9 3
48 8 3
24 8 1
22 8 4
7 8 2
37 8 2
19 8 5
33 7 2
18 7 1
22 7 1
18 7 1
24 7 3
25 7 3
16 7 1
13 7 1
12 7 2
9 7 2
33 7 1
68 7 2
32 7 2