facebookresearch / video-nonlocal-net
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 150 units with 3,590 lines of code in units (70.3% of code).
    • 1 very complex units (298 lines of code)
    • 0 complex units (0 lines of code)
    • 11 medium complex units (910 lines of code)
    • 25 simple units (1,135 lines of code)
    • 113 very simple units (1,247 lines of code)
8% | 0% | 25% | 31% | 34%
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
cc30% | 0% | 22% | 36% | 11%
py0% | 0% | 23% | 28% | 47%
h0% | 0% | 38% | 33% | 27%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
caffe2_customized_ops/video20% | 0% | 27% | 35% | 16%
lib/models0% | 0% | 41% | 27% | 30%
lib/utils0% | 0% | 20% | 24% | 55%
process_data/kinetics0% | 0% | 0% | 73% | 26%
lib/core0% | 0% | 0% | 37% | 62%
tools0% | 0% | 0% | 0% | 100%
process_data/convert_models0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
cc
void CustomVideoDecoder::decodeLoop()
in caffe2_customized_ops/video/customized_video_decoder.cc
298 60 6
def get_flops_params()
in lib/utils/misc.py
58 19 1
def initialize_master_gpu_model_params()
in lib/utils/checkpoints.py
91 19 3
bool CustomizedVideoInputOp::Prefetch()
in caffe2_customized_ops/video/customized_video_input_op.h
94 16 0
def create_model()
in lib/models/resnet_video.py
115 16 4
def create_model()
in lib/models/resnet_video_org.py
115 16 4
cc
bool ReadClipFromVideoSequential()
in caffe2_customized_ops/video/customized_video_io.cc
79 15 7
cc
bool ReadClipFromVideoLazzy()
in caffe2_customized_ops/video/customized_video_io.cc
75 14 7
def spacetime_nonlocal()
in lib/models/nonlocal_helper.py
95 13 9
cc
void ClipTransformFlex()
in caffe2_customized_ops/video/customized_video_io.cc
67 12 16
void CustomizedVideoInputOp::DecodeAndTransform()
in caffe2_customized_ops/video/customized_video_input_op.h
95 12 11
def load_model_from_params_file()
in lib/utils/checkpoints.py
26 12 1
cc
bool ReadClipFromFrames()
in caffe2_customized_ops/video/customized_video_io.cc
54 10 8
cc
bool DecodeClipFromMemoryBuffer()
in caffe2_customized_ops/video/customized_video_io.cc
64 10 9
def merge_dicts()
in lib/core/config.py
25 10 2
def print_net()
in lib/utils/misc.py
33 10 1
def create_an_lmdb_database()
in process_data/kinetics/create_video_lmdb_test_multicrop.py
58 10 3
def create_an_lmdb_database()
in process_data/kinetics/create_video_lmdb_test_flipcrop.py
58 10 3
bool CustomizedVideoInputOp::GetClipAndLabelFromDBValue()
in caffe2_customized_ops/video/customized_video_input_op.h
70 9 6
23 9 2