facebookresearch / dynalab
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 83 units with 1,235 lines of code in units (87.0% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (82 lines of code)
    • 11 simple units (543 lines of code)
    • 70 very simple units (610 lines of code)
0% | 0% | 6% | 43% | 49%
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% | 6% | 43% | 49%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
dynalab_cli0% | 0% | 9% | 46% | 43%
dynalab/tasks0% | 0% | 0% | 39% | 60%
dynalab/handler0% | 0% | 0% | 0% | 100%
dynalab0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def validate_config()
in dynalab_cli/utils.py
62 13 1
def write_exclude_filelist()
in dynalab_cli/utils.py
20 11 4
def get_mock_data()
in dynalab/tasks/task_io.py
77 9 1
def run_command()
in dynalab_cli/test.py
26 9 1
def run_docker_test()
in dynalab_cli/test.py
137 9 2
def run_command()
in dynalab_cli/init.py
65 9 1
def initialize_paths()
in dynalab_cli/init.py
27 9 3
24 8 3
def verify_response()
in dynalab/tasks/task_io.py
24 7 3
def run_command()
in dynalab_cli/upload.py
96 7 1
def check_path()
in dynalab_cli/utils.py
10 7 4
def initialize_path()
in dynalab_cli/init.py
26 7 3
def mock_handle_individually()
in dynalab/tasks/task_io.py
31 6 4
def __init__()
in dynalab/tasks/task_io.py
13 5 3
def mock_handle_with_batching()
in dynalab/tasks/task_io.py
26 5 4
def get_task_submission_limit()
in dynalab_cli/utils.py
13 5 1
def initialize_field()
in dynalab_cli/init.py
11 5 3
def initialize_inputs_and_targets()
in dynalab/tasks/task_io.py
12 4 1
def generate_multiclass_probs_mock_data()
in dynalab/tasks/annotation_mock_data.py
15 4 2
def use_gpu()
in dynalab_cli/test.py
13 4 2