facebookresearch / DepthContrast
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 215 units with 3,594 lines of code in units (76.4% of code).
    • 0 very complex units (0 lines of code)
    • 2 complex units (276 lines of code)
    • 10 medium complex units (369 lines of code)
    • 18 simple units (606 lines of code)
    • 185 very simple units (2,343 lines of code)
0% | 7% | 10% | 16% | 65%
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% | 7% | 10% | 16% | 65%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
datasets/transforms0% | 37% | 10% | 3% | 48%
models0% | 19% | 30% | 27% | 22%
datasets/collators0% | 0% | 70% | 26% | 2%
utils0% | 0% | 17% | 14% | 68%
ROOT0% | 0% | 43% | 37% | 18%
models/trunks0% | 0% | 2% | 7% | 90%
datasets0% | 0% | 0% | 61% | 38%
criterions0% | 0% | 0% | 50% | 50%
data/waymo0% | 0% | 0% | 87% | 12%
data/scannet0% | 0% | 0% | 19% | 80%
data/redwood0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def get_transform3d()
in datasets/transforms/augment3d.py
216 38 3
def get_optimizer_params()
in models/base_ssl3d_model.py
60 27 1
def point_vox_moco_collator()
in datasets/collators/point_vox_moco_lidar_collator.py
62 23 1
def _single_input_forward_MOCO()
in models/base_ssl3d_model.py
53 21 5
def convert_conv_type()
in models/trunks/spconv/models/modules/common.py
37 16 3
def run_phase()
in main.py
42 14 10
def voxelize_temporal()
in datasets/transforms/voxelizer.py
38 13 6
def voxelize()
in datasets/transforms/voxelizer.py
21 11 5
def point_vox_moco_collator()
in datasets/collators/point_vox_moco_collator.py
22 11 1
def prep_environment()
in utils/main_utils.py
31 11 2
def distribute_model_to_cuda()
in utils/main_utils.py
22 11 2
def _batch_shuffle_ddp()
in models/base_ssl3d_model.py
41 11 4
def get_transformation_matrix()
in datasets/transforms/voxelizer.py
23 10 1
def _get_trunk()
in models/base_ssl3d_model.py
31 10 1
36 10 4
def toVox()
in datasets/depth_dataset.py
30 9 4
def forward()
in criterions/nce_loss_moco.py
54 9 2
def __getitem__()
in datasets/depth_dataset.py
57 8 2
def recursive_copy_to_gpu()
in utils/main_utils.py
32 8 4
def _single_input_forward()
in models/base_ssl3d_model.py
21 8 5