facebookresearch / meshtalk
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 39 units with 409 lines of code in units (1.6% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 0 medium complex units (0 lines of code)
    • 1 simple units (26 lines of code)
    • 38 very simple units (383 lines of code)
0% | 0% | 0% | 6% | 93%
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% | 0% | 6% | 93%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
models0% | 0% | 0% | 9% | 90%
utils0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def forward_inference()
in models/context_model.py
26 7 5
def sample()
in models/context_model.py
17 5 3
def forward()
in models/encoders.py
18 4 2
def to_video()
in utils/renderer.py
23 3 6
def load_audio()
in utils/helpers.py
8 3 1
2 3 1
def __init__()
in models/context_model.py
17 3 7
def forward()
in models/context_model.py
13 3 3
def __init__()
in models/encoders.py
13 3 6
def __init__()
in models/vertex_unet.py
22 3 7
def __init__()
in utils/renderer.py
10 2 2
def audio_chunking()
in utils/helpers.py
7 2 3
def smooth_geom()
in utils/helpers.py
17 2 4
def save()
in utils/helpers.py
9 2 3
def load()
in utils/helpers.py
11 2 3
def receptive_field()
in models/context_model.py
5 2 1
def receptive_field()
in models/context_model.py
5 2 1
def _reset()
in models/context_model.py
5 2 1
def _forward_inference()
in models/context_model.py
10 2 5
def forward()
in models/context_model.py
10 2 3