facebookresearch / DensePose
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 551 units with 9,033 lines of code in units (66.4% of code).
    • 2 very complex units (188 lines of code)
    • 7 complex units (643 lines of code)
    • 37 medium complex units (2,109 lines of code)
    • 57 simple units (1,504 lines of code)
    • 448 very simple units (4,589 lines of code)
2% | 7% | 23% | 16% | 50%
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
py2% | 7% | 23% | 16% | 50%
pyx0% | 0% | 0% | 51% | 48%
cc0% | 0% | 0% | 0% | 100%
h0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
challenge/2019_COCO_DensePose10% | 18% | 43% | 10% | 16%
detectron/datasets4% | 14% | 19% | 13% | 47%
detectron/utils0% | 7% | 10% | 22% | 60%
detectron/roi_data0% | 6% | 37% | 13% | 41%
detectron/modeling0% | 0% | 22% | 8% | 68%
detectron/core0% | 0% | 45% | 22% | 31%
tools0% | 0% | 0% | 52% | 47%
detectron/ops0% | 0% | 0% | 34% | 65%
challenge0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def evaluateImg()
in challenge/2019_COCO_DensePose/densepose_cocoeval.py
96 75 6
def evaluateImg()
in detectron/datasets/densepose_cocoeval.py
92 70 5
def accumulate()
in detectron/datasets/densepose_cocoeval.py
86 35 2
def accumulate()
in challenge/2019_COCO_DensePose/densepose_cocoeval.py
86 35 2
def vis_one_image()
in detectron/utils/vis.py
140 31 14
def _prepare()
in challenge/2019_COCO_DensePose/densepose_cocoeval.py
81 29 1
def _prepare()
in detectron/datasets/densepose_cocoeval.py
76 28 1
def add_retinanet_blobs()
in detectron/roi_data/retinanet.py
62 28 5
def _add_gt_annotations()
in detectron/datasets/json_dataset.py
112 26 2
def voc_eval()
in detectron/datasets/voc_eval.py
86 25 7
def computeOgps()
in challenge/2019_COCO_DensePose/densepose_cocoeval.py
59 25 3
def add_fpn_retinanet_outputs()
in detectron/modeling/retinanet_heads.py
160 24 4
def evaluate()
in challenge/2019_COCO_DensePose/densepose_cocoeval.py
54 23 8
def computeOgpsDraft()
in challenge/2019_COCO_DensePose/densepose_cocoeval.py
55 23 3
def computeOgps()
in detectron/datasets/densepose_cocoeval.py
47 21 3
def get_fast_rcnn_blob_names()
in detectron/roi_data/fast_rcnn.py
49 21 1
def computeIoU()
in detectron/datasets/densepose_cocoeval.py
25 19 3
58 19 3
def computeIoU()
in challenge/2019_COCO_DensePose/densepose_cocoeval.py
25 19 3
def im_detect_all()
in detectron/core/test.py
50 18 4