facebookresearch / fairmotion
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 392 units with 3,650 lines of code in units (60.0% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 7 medium complex units (335 lines of code)
    • 17 simple units (485 lines of code)
    • 368 very simple units (2,830 lines of code)
0% | 0% | 9% | 13% | 77%
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% | 9% | 13% | 77%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
fairmotion/data0% | 0% | 47% | 24% | 28%
fairmotion/viz0% | 0% | 11% | 7% | 81%
fairmotion/tasks/clustering0% | 0% | 6% | 3% | 89%
fairmotion/ops0% | 0% | 3% | 16% | 79%
fairmotion/tasks/motion_prediction0% | 0% | 0% | 30% | 69%
fairmotion/tasks/motion_graph0% | 0% | 0% | 27% | 72%
fairmotion/models0% | 0% | 0% | 13% | 86%
fairmotion/core0% | 0% | 0% | 2% | 97%
fairmotion/utils0% | 0% | 0% | 0% | 100%
fairmotion/tasks/changepoint_detection0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def parse_asf()
in fairmotion/data/asfamc.py
75 14 1
def parse_amc()
in fairmotion/data/asfamc.py
54 14 3
def project_rotation_2D()
in fairmotion/ops/math.py
18 13 4
def main()
in fairmotion/tasks/clustering/clustering.py
34 11 1
def keyboard_callback()
in fairmotion/viz/bvh_visualizer.py
56 11 2
def render_ground()
in fairmotion/viz/pyrender_visualizer.py
52 11 14
def save()
in fairmotion/data/bvh.py
46 11 5
def train()
in fairmotion/tasks/motion_prediction/training.py
105 10 1
def create_random_motion()
in fairmotion/tasks/motion_graph/motion_graph.py
35 9 3
def append_and_blend()
in fairmotion/ops/motion.py
44 9 3
def _write_hierarchy()
in fairmotion/data/bvh.py
38 9 6
def forward()
in fairmotion/models/transformer.py
41 8 5
def main()
in fairmotion/viz/tsne.py
29 8 1
def Q_op()
in fairmotion/ops/quaternion.py
16 8 3
def __eq__()
in fairmotion/core/motion.py
11 7 2
def process_file()
in fairmotion/tasks/motion_prediction/preprocess.py
24 6 4
def reduce()
in fairmotion/tasks/motion_graph/motion_graph.py
15 6 3
def transform_and_fetch_position()
in fairmotion/tasks/clustering/features/manual.py
18 6 2
def mouse_func()
in fairmotion/viz/glut_viewer.py
13 6 5
def render_arrow()
in fairmotion/viz/gl_render.py
29 6 7