facebookresearch / WyPR
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 275 units with 3,853 lines of code in units (70.1% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (76 lines of code)
    • 12 medium complex units (744 lines of code)
    • 23 simple units (559 lines of code)
    • 239 very simple units (2,474 lines of code)
0% | 1% | 19% | 14% | 64%
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% | 2% | 20% | 13% | 63%
cpp0% | 0% | 0% | 25% | 74%
h0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
wypr/evaluation0% | 23% | 37% | 0% | 39%
wypr/dataset0% | 0% | 38% | 11% | 49%
wypr/utils0% | 0% | 18% | 16% | 65%
gss0% | 0% | 7% | 19% | 73%
shape_det0% | 0% | 0% | 41% | 58%
wypr/modeling0% | 0% | 0% | 10% | 89%
wypr/tools0% | 0% | 0% | 37% | 62%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def parse_predictions()
in wypr/evaluation/ap_helper.py
76 27 8
def __getitem__()
in wypr/dataset/s3dis/s3dis.py
122 22 2
def __getitem__()
in wypr/dataset/scannet/scannet.py
109 21 2
def eval_prop_cls()
in wypr/utils/eval_prop.py
55 21 4
def make_confusion_matrix()
in wypr/evaluation/cf_matrix.py
77 20 14
def export()
in wypr/dataset/scannet/preprocess_scannet_all_points.py
64 18 7
def eval_det_cls()
in wypr/utils/eval_det.py
53 17 5
def write_bbox()
in wypr/dataset/scannet/vis.py
113 16 2
def eval_det_multiprocessing()
in wypr/utils/eval_det.py
32 15 5
def eval_prop_multiprocessing()
in wypr/utils/eval_prop.py
24 15 4
def eval_det()
in wypr/utils/eval_det.py
26 12 5
def run_s3dis()
in gss/selective_search_3d_run.py
25 11 2
def evaluate_iou()
in wypr/evaluation/iou_helper.py
44 11 4
28 10 8
def _run_gss()
in gss/selective_search_3d_run.py
36 10 3
def __init__()
in wypr/dataset/s3dis/s3dis.py
35 10 9
def point_cloud_to_volume_v2()
in wypr/utils/pc_util.py
27 10 4
def forward()
in wypr/modeling/backbone/pointnet2/pointnet2_utils.py
40 10 4
def forward()
in wypr/modeling/backbone/pointnet2/pointnet2_modules.py
39 10 4
def __init__()
in wypr/dataset/scannet/scannet.py
31 9 10