facebookresearch / AVID-CMA
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 181 units with 2,634 lines of code in units (66.7% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 13 medium complex units (504 lines of code)
    • 26 simple units (770 lines of code)
    • 142 very simple units (1,360 lines of code)
0% | 0% | 19% | 29% | 51%
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% | 19% | 29% | 51%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ROOT0% | 0% | 69% | 22% | 8%
datasets0% | 0% | 19% | 22% | 57%
utils0% | 0% | 8% | 30% | 60%
utils/ioutils0% | 0% | 61% | 35% | 2%
utils/videotransforms0% | 0% | 9% | 35% | 54%
criterions0% | 0% | 3% | 43% | 53%
models0% | 0% | 0% | 0% | 100%
utils/videotransforms/utils0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def run_phase()
in eval-action-recg-linear.py
60 23 8
def __getitem__()
in datasets/video_db.py
47 18 2
def resize_clip()
in utils/videotransforms/functional.py
37 17 3
def run_phase()
in main-avid.py
42 17 10
def main_worker()
in eval-action-recg.py
45 16 5
def run_phase()
in eval-action-recg.py
56 16 8
def distribute_model_to_cuda()
in utils/main_utils.py
27 14 5
def _get_clip()
in datasets/video_db.py
41 13 8
def av_laod_audio()
in utils/ioutils/av_wrappers.py
47 12 4
def find_correspondences()
in criterions/avid_cma.py
14 12 1
def __call__()
in datasets/preprocessing.py
19 11 4
def prep_environment()
in utils/main_utils.py
31 11 2
def main_worker()
in main-avid.py
38 11 4
def av_load_video()
in utils/ioutils/av_wrappers.py
27 10 4
def __init__()
in utils/alias_method.py
25 10 2
def prepare_environment()
in utils/eval_utils.py
30 10 3
def build_dataloader()
in utils/eval_utils.py
56 10 5
def __call__()
in utils/videotransforms/volume_transforms.py
32 10 2
def __call__()
in utils/videotransforms/video_transforms.py
26 9 2
def main_worker()
in eval-action-recg-linear.py
36 9 5