facebookresearch / video-long-term-feature-banks
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 273 units with 4,091 lines of code in units (54.5% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 8 medium complex units (654 lines of code)
    • 44 simple units (1,205 lines of code)
    • 221 very simple units (2,232 lines of code)
0% | 0% | 15% | 29% | 54%
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% | 16% | 29% | 54%
h0% | 0% | 0% | 0% | 100%
cc0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lib/models0% | 0% | 31% | 17% | 50%
lib/datasets0% | 0% | 12% | 40% | 47%
lib/utils0% | 0% | 13% | 22% | 63%
tools0% | 0% | 0% | 38% | 61%
lib/core0% | 0% | 0% | 38% | 61%
caffe2_customized_ops/video0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def get_flops_params()
in lib/utils/misc.py
77 21 1
def create_model()
in lib/models/resnet_video.py
191 21 6
def initialize_master_gpu_model_params()
in lib/utils/checkpoints.py
98 20 3
def images_and_boxes_preprocessing()
in lib/datasets/data_input_helper.py
44 18 5
def load_boxes_and_labels()
in lib/datasets/ava.py
38 17 4
def random_crop_list()
in lib/datasets/image_processor.py
38 16 5
def spacetime_nonlocal()
in lib/models/nonlocal_helper.py
105 13 9
def _create_execution_context()
in lib/datasets/data_input_helper.py
63 12 6
def get_lfb()
in tools/lfb_loader.py
56 10 2
def merge_dicts()
in lib/core/config.py
25 10 2
def get_minibatch_info()
in lib/datasets/epic.py
33 10 2
def _get_data()
in lib/datasets/ava.py
32 10 1
def get_minibatch_info()
in lib/datasets/charades.py
38 10 2
def random_short_side_scale_jitter_list()
in lib/datasets/image_processor.py
22 9 4
def color_jitter_list()
in lib/datasets/image_processor.py
18 9 4
def create_threads()
in lib/datasets/dataloader.py
34 9 1
def save_model_params()
in lib/utils/checkpoints.py
35 9 3
def NLCore()
in lib/models/lfb_helper.py
75 9 10
def construct_frame_level_lfb()
in tools/lfb_loader.py
21 8 2
def horizontal_flip_list()
in lib/datasets/image_processor.py
16 8 5