facebookresearch / Large-Scale-VRD
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 350 units with 6,125 lines of code in units (72.3% of code).
    • 0 very complex units (0 lines of code)
    • 2 complex units (341 lines of code)
    • 22 medium complex units (1,612 lines of code)
    • 42 simple units (1,238 lines of code)
    • 284 very simple units (2,934 lines of code)
0% | 5% | 26% | 20% | 47%
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% | 5% | 26% | 19% | 47%
pyx0% | 0% | 0% | 51% | 48%
cc0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lib/utils0% | 11% | 12% | 23% | 52%
lib/roi_data0% | 0% | 66% | 12% | 20%
lib/datasets0% | 0% | 46% | 12% | 40%
lib/modeling0% | 0% | 14% | 22% | 62%
lib/core0% | 0% | 42% | 12% | 45%
lib/ops0% | 0% | 0% | 40% | 59%
tools0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def eval_im_dets_triplet_topk()
in lib/utils/evaluator_rel.py
227 41 1
def vis_one_image()
in lib/utils/vis.py
114 29 13
def add_fast_rcnn_blobs()
in lib/roi_data/fast_rcnn_rel.py
174 25 8
def add_embd_triplet_losses_labeled()
in lib/modeling/VGG16_rel_softmaxed_triplet.py
88 20 2
def _sample_rois_triplet_yall()
in lib/roi_data/fast_rcnn_rel.py
205 20 15
def _sample_rois_pos_neg_for_one_branch()
in lib/roi_data/fast_rcnn_rel.py
82 20 6
58 19 3
def _load_vg_annotation()
in lib/datasets/vg_wiki_and_relco.py
151 18 5
def _sample_rois_softmax_yall()
in lib/roi_data/fast_rcnn_rel.py
164 16 15
def vis_keypoints()
in lib/utils/vis.py
46 15 4
def vis_one_image_opencv()
in lib/utils/vis.py
32 15 9
def check()
in lib/utils/model_convert_utils.py
17 15 2
def add_Conv_layer_with_weight_name()
in lib/modeling/detector_rel.py
61 15 11
def evaluate_recall()
in lib/datasets/imdb_rel.py
121 14 5
def initialize_master_device_model_params()
in lib/utils/checkpoints_rel.py
43 14 2
def get_gt_perturbed_proposals()
in lib/core/get_gt_perturbed_proposals.py
89 13 1
def load_model_from_params_file()
in lib/utils/checkpoints_rel.py
24 13 3
def get_flops_params()
in lib/utils/helpers_rel.py
45 12 2
def print_net()
in lib/utils/net_rel.py
31 12 2
def combined_roidb_for_training()
in lib/datasets/roidb_rel.py
78 11 2