facebookresearch / synsin
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 225 units with 3,974 lines of code in units (78.1% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 8 medium complex units (500 lines of code)
    • 23 simple units (974 lines of code)
    • 194 very simple units (2,500 lines of code)
0% | 0% | 12% | 24% | 62%
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% | 12% | 24% | 62%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
data0% | 0% | 41% | 13% | 45%
models0% | 0% | 21% | 0% | 78%
ROOT0% | 0% | 43% | 35% | 21%
models/networks0% | 0% | 2% | 38% | 58%
models/layers0% | 0% | 0% | 51% | 48%
options0% | 0% | 0% | 14% | 85%
models/losses0% | 0% | 0% | 20% | 79%
evaluation0% | 0% | 0% | 23% | 76%
models/projection0% | 0% | 0% | 0% | 100%
utils0% | 0% | 0% | 0% | 100%
geometry0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def init_weights()
in models/networks/discriminators.py
34 19 3
def init_weights()
in models/base_model.py
29 14 2
def train()
in train.py
49 14 6
def __init__()
in data/create_rgb_dataset.py
115 14 6
def val()
in train.py
42 12 5
def forward()
in models/z_buffermodel.py
65 11 2
def get_vector_sample()
in data/create_rgb_dataset.py
82 11 4
def get_singleenv_sample()
in data/create_rgb_dataset.py
84 11 2
def __init__()
in models/networks/pretrained_networks.py
30 10 3
def run()
in train.py
75 10 5
def __getitem__()
in data/habitat_data.py
21 9 2
def get_D_norm_layer()
in models/layers/normalization.py
25 8 2
def manual_bn()
in models/layers/normalization.py
11 8 5
def forward()
in models/networks/sync_batchnorm/batchnorm.py
32 8 2
def __init__()
in models/networks/pretrained_networks.py
24 8 3
def __init__()
in models/networks/pretrained_networks.py
22 8 3
def __init__()
in models/networks/architectures.py
23 8 2
def loss()
in models/losses/gan_loss.py
27 7 4
def forward()
in models/layers/z_buffer_layers.py
48 7 3
def get_resnet_arch()
in models/networks/configs.py
276 7 3