facebookresearch / svoice
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 102 units with 1,365 lines of code in units (79.5% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (139 lines of code)
    • 14 simple units (387 lines of code)
    • 86 very simple units (839 lines of code)
0% | 0% | 10% | 28% | 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
py0% | 0% | 10% | 28% | 61%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
svoice0% | 0% | 20% | 29% | 50%
svoice/data0% | 0% | 0% | 47% | 52%
ROOT0% | 0% | 0% | 91% | 8%
svoice/models0% | 0% | 0% | 11% | 88%
scripts0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def train()
in svoice/solver.py
54 16 1
def evaluate_auto_select()
in svoice/evaluate_auto_select.py
85 13 1
def _reset()
in svoice/solver.py
17 10 1
def __exit__()
in svoice/executor.py
26 10 4
def run()
in train.py
53 10 1
def evaluate()
in svoice/evaluate.py
52 9 4
def _run_one_epoch()
in svoice/solver.py
33 8 3
def separate()
in svoice/separate.py
38 8 3
def __init__()
in svoice/data/audio.py
17 7 6
def _main()
in train.py
15 7 1
def __init__()
in svoice/solver.py
33 6 5
def forward()
in svoice/models/swave.py
29 6 2
def find_audio_files()
in svoice/data/audio.py
16 6 3
def __getitem__()
in svoice/data/audio.py
17 6 2
def __init__()
in svoice/data/data.py
22 6 6
def __init__()
in svoice/data/data.py
19 6 2
def save_wavs()
in svoice/separate.py
10 5 6
def _log()
in svoice/utils.py
14 5 1
def remove_pad()
in svoice/utils.py
11 5 2
def __init__()
in svoice/data/data.py
22 5 5