facebookresearch / Ego-Exo
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 445 units with 7,889 lines of code in units (54.8% of code).
    • 0 very complex units (0 lines of code)
    • 5 complex units (557 lines of code)
    • 28 medium complex units (1,758 lines of code)
    • 56 simple units (1,584 lines of code)
    • 356 very simple units (3,990 lines of code)
0% | 7% | 22% | 20% | 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
py0% | 7% | 22% | 20% | 50%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
tools0% | 55% | 12% | 20% | 11%
tools/epic0% | 44% | 37% | 0% | 17%
tools/handobj0% | 44% | 37% | 0% | 17%
slowfast/datasets0% | 0% | 44% | 26% | 29%
slowfast/utils0% | 0% | 12% | 24% | 62%
tools/kd0% | 0% | 81% | 0% | 18%
slowfast/visualization0% | 0% | 0% | 80% | 19%
slowfast/models0% | 0% | 0% | 7% | 92%
slowfast/config0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def demo()
in tools/demo_net.py
228 42 1
def train()
in tools/epic/handobj/train_net.py
84 27 1
def train()
in tools/epic/train_net.py
81 26 1
def train()
in tools/handobj/train_net.py
82 26 1
def train()
in tools/train_net.py
82 26 1
def train()
in tools/kd/train_net.py
79 25 1
def eval_epoch()
in tools/train_net.py
70 24 6
def eval_epoch()
in tools/kd/train_net.py
70 23 6
def eval_epoch()
in tools/handobj/train_net.py
70 23 6
def _images_and_boxes_preprocessing_cv2()
in slowfast/datasets/ava_dataset.py
90 22 3
def load_boxes_and_labels()
in slowfast/datasets/ava_helper.py
56 20 2
def __getitem__()
in slowfast/datasets/kinetics_aux.py
98 20 2
def __getitem__()
in slowfast/datasets/kinetics.py
97 20 2
def __getitem__()
in slowfast/datasets/charades_aux.py
105 18 2
def __getitem__()
in slowfast/datasets/epic.py
88 18 2
def __getitem__()
in slowfast/datasets/epic_aux.py
98 18 2
def __getitem__()
in slowfast/datasets/charades.py
89 18 2
def random_crop_list()
in slowfast/datasets/cv2_transform.py
43 17 5
def __getitem__()
in slowfast/datasets/ssv2.py
68 16 2
def compute_average_precision()
in slowfast/utils/ava_evaluation/metrics.py
30 16 2