facebookresearch / c3dpo_nrsfm
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 139 units with 2,200 lines of code in units (72.0% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 10 medium complex units (538 lines of code)
    • 14 simple units (459 lines of code)
    • 115 very simple units (1,203 lines of code)
0% | 0% | 24% | 20% | 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% | 24% | 20% | 54%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
tools0% | 0% | 29% | 20% | 49%
ROOT0% | 0% | 23% | 22% | 53%
dataset0% | 0% | 15% | 18% | 66%
visuals0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def concatenate_cache()
in tools/cache_preds.py
31 23 1
def run_phi()
in model.py
88 21 4
def show_projections()
in tools/vis_utils.py
91 20 14
def plot_stats()
in tools/stats.py
71 18 5
def run_training()
in experiment.py
68 15 1
def dataset_zoo()
in dataset/dataset_zoo.py
47 13 3
def cache_preds()
in tools/cache_preds.py
33 12 5
38 12 3
def visualize()
in model.py
53 12 6
def eval_results_per_class()
in dataset/eval_zoo.py
18 11 4
def write_frame()
in tools/video_writer.py
26 10 3
def update()
in tools/stats.py
36 10 5
28 10 4
def forward()
in model.py
63 10 6
def init_optimizer()
in experiment.py
43 10 3
def trainvalidate()
in experiment.py
44 10 11
def __getitem__()
in dataset/keypoints_dataset.py
24 9 2
def get_epoch_averages()
in tools/stats.py
22 8 2
def matplot_plot_point_cloud()
in tools/vis_utils.py
41 8 6
def calc_stress_err()
in dataset/eval_zoo.py
38 8 5