facebookresearch / dora
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 199 units with 1,814 lines of code in units (80.3% of code).
    • 1 very complex units (155 lines of code)
    • 0 complex units (0 lines of code)
    • 5 medium complex units (243 lines of code)
    • 20 simple units (392 lines of code)
    • 173 very simple units (1,024 lines of code)
8% | 0% | 13% | 21% | 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
py8% | 0% | 13% | 21% | 56%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
dora8% | 0% | 13% | 21% | 56%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def run_grid()
in dora/grid.py
155 57 4
def _submit()
in dora/shep.py
65 20 2
def launch_action()
in dora/launch.py
53 19 2
def info_action()
in dora/info.py
37 15 2
def monitor()
in dora/grid.py
46 14 5
def get_trainer()
in dora/lightning.py
42 13 4
def jsonable()
in dora/utils.py
16 10 1
def __exit__()
in dora/executor.py
23 10 4
21 9 4
def _get_explore()
in dora/grid.py
24 8 1
def _log()
in dora/log.py
17 8 1
def value_to_argv()
in dora/main.py
18 8 2
def main()
in dora/__main__.py
27 8 0
def _match_name()
in dora/grid.py
15 7 2
18 7 3
21 7 3
def state()
in dora/shep.py
10 7 2
37 7 4
def _get_base_config()
in dora/hydra.py
20 7 2
def get_names()
in dora/names.py
18 7 2