microsoft / singleshotpose
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 274 units with 6,834 lines of code in units (73.1% of code).
    • 0 very complex units (0 lines of code)
    • 4 complex units (442 lines of code)
    • 42 medium complex units (3,141 lines of code)
    • 25 simple units (1,081 lines of code)
    • 203 very simple units (2,170 lines of code)
0% | 6% | 45% | 15% | 31%
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% | 6% | 45% | 15% | 31%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
py20% | 4% | 47% | 14% | 33%
ROOT0% | 6% | 49% | 15% | 27%
multi_obj_pose_estimation0% | 7% | 40% | 17% | 34%
py2/multi_obj_pose_estimation0% | 8% | 45% | 16% | 30%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
112 30 2
def create_network()
in py2/darknet.py
112 30 2
def create_network()
in multi_obj_pose_estimation/darknet_multi.py
109 29 2
def create_network()
in py2/multi_obj_pose_estimation/darknet_multi.py
109 29 2
def get_multi_region_boxes()
in multi_obj_pose_estimation/utils_multi.py
105 25 9
def valid()
in py2/valid.py
172 24 4
def valid()
in valid.py
165 23 3
def eval()
in multi_obj_pose_estimation/train_multi.py
101 22 2
def valid()
in multi_obj_pose_estimation/valid_multi.py
93 22 3
def forward()
in darknet.py
46 21 2
def __getitem__()
in dataset.py
59 21 2
def forward()
in multi_obj_pose_estimation/darknet_multi.py
46 21 2
def forward()
in py2/darknet.py
46 21 2
def forward()
in py2/multi_obj_pose_estimation/darknet_multi.py
46 21 2
def eval()
in py2/multi_obj_pose_estimation/train_multi.py
102 21 3
116 19 1
def print_cfg()
in py2/cfg.py
116 19 1
def valid()
in py2/multi_obj_pose_estimation/valid_multi.py
95 19 4
146 19 8
def get_boxes()
in py2/utils.py
146 19 8