facebookresearch / eft
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 594 units with 19,230 lines of code in units (87.2% of code).
    • 17 very complex units (5,067 lines of code)
    • 12 complex units (1,949 lines of code)
    • 71 medium complex units (4,855 lines of code)
    • 92 simple units (2,986 lines of code)
    • 402 very simple units (4,373 lines of code)
26% | 10% | 25% | 15% | 22%
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
py26% | 10% | 25% | 15% | 22%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
eft/apps93% | 0% | 5% | 0% | 1%
eft/datasets87% | 6% | 0% | 0% | 6%
bodymocap/apps89% | 0% | 6% | 0% | 4%
eft/db_processing8% | 10% | 45% | 27% | 7%
bodymocap/train16% | 51% | 15% | 3% | 12%
eft/train10% | 27% | 41% | 4% | 15%
renderer0% | 4% | 24% | 34% | 36%
bodymocap/models0% | 0% | 71% | 3% | 25%
bodymocap/utils0% | 0% | 13% | 13% | 73%
eft/smplify0% | 0% | 27% | 40% | 32%
eft/utils0% | 0% | 11% | 19% | 69%
eft/cores0% | 0% | 53% | 0% | 46%
bodymocap/core0% | 0% | 52% | 0% | 47%
eft/models0% | 0% | 0% | 22% | 77%
renderer/shaders0% | 0% | 0% | 45% | 54%
bodymocap0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def __init__()
in eft/datasets/mixed_dataset.py
1083 517 3
def eftAllInDB()
in eft/train/eftFitter.py
217 139 5
def eftAllInDB()
in bodymocap/train/eftFitter.py
221 135 4
def __init__()
in eft/datasets/base_dataset.py
317 88 8
def run_evaluation()
in eft/apps/evalfrompkl_iter.py
128 81 10
def run_evaluation()
in bodymocap/apps/evalfrompkl_iter.py
126 80 10
def run_evaluation()
in eft/apps/evalfrompkl_frankmocap.py
344 75 10
def run_evaluation()
in eft/apps/eval.py
252 75 10
def run_evaluation()
in eft/apps/evalfrompkl.py
335 74 10
def run_evaluation()
in eft/apps/evalfrompkl_hmr.py
329 74 10
def run_evaluation()
in bodymocap/apps/evalfrompkl.py
297 73 10
def run_evaluation()
in bodymocap/apps/eval.py
234 68 10
def run_evaluation()
in eft/apps/eval_multicrop.py
238 68 10
def run_evaluation()
in eft/apps/eval_export.py
257 66 10
def __init__()
in eft/datasets/video_dataset.py
233 55 8
def __getitem__()
in eft/datasets/base_dataset.py
156 54 2
def RenderFitting()
in eft/db_processing/AMT_sample_gen.py
300 52 5
def eftAllInDB_3dpwtest()
in bodymocap/train/eftFitter.py
152 46 4
def __getitem__()
in eft/datasets/video_dataset.py
125 39 2
def run_eft_step_wHand()
in bodymocap/train/eftFitter.py
169 37 2