facebookresearch / simsiam
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 33 units with 505 lines of code in units (74.7% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (138 lines of code)
    • 1 medium complex units (101 lines of code)
    • 4 simple units (101 lines of code)
    • 27 very simple units (165 lines of code)
0% | 27% | 20% | 20% | 32%
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% | 27% | 20% | 20% | 32%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ROOT0% | 29% | 21% | 21% | 27%
simsiam0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def main_worker()
in main_lincls.py
138 42 3
def main_worker()
in main_simsiam.py
101 21 3
def main()
in main_simsiam.py
23 7 0
def main()
in main_lincls.py
23 7 0
def train()
in main_simsiam.py
25 6 6
def train()
in main_lincls.py
30 6 6
def validate()
in main_lincls.py
29 5 4
def sanity_check()
in main_lincls.py
12 5 2
def adjust_learning_rate()
in main_simsiam.py
7 4 4
def save_checkpoint()
in main_simsiam.py
4 2 3
def display()
in main_simsiam.py
4 2 2
def forward()
in simsiam/builder.py
6 2 3
def save_checkpoint()
in main_lincls.py
4 2 3
def display()
in main_lincls.py
4 2 2
4 2 4
def accuracy()
in main_lincls.py
12 2 3
def __init__()
in main_simsiam.py
4 1 3
def reset()
in main_simsiam.py
5 1 1
def update()
in main_simsiam.py
5 1 3
def __str__()
in main_simsiam.py
3 1 1