aws-samples / end-2-end-3d-ml
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 36 units with 1,265 lines of code in units (71.8% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (208 lines of code)
    • 3 medium complex units (326 lines of code)
    • 8 simple units (397 lines of code)
    • 24 very simple units (334 lines of code)
0% | 16% | 25% | 31% | 26%
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% | 16% | 25% | 31% | 26%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
a2d20% | 26% | 11% | 30% | 31%
container_training0% | 0% | 62% | 37% | 0%
docker0% | 0% | 62% | 37% | 0%
ROOT0% | 0% | 0% | 24% | 76%
container_inference/mm3d0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def create_groundtruth_database()
in a2d2/a2d2_database.py
208 31 14
def main()
in container_training/train.py
119 18 0
def main()
in docker/train.py
119 18 0
def bbox2result_kitti2d()
in a2d2/a2d2_dataset.py
88 11 5
def bbox2result_kitti()
in a2d2/a2d2_dataset.py
92 10 5
def format_results()
in a2d2/a2d2_dataset.py
36 9 4
def evaluate()
in a2d2/a2d2_dataset.py
40 9 9
def get_axes_of_a_view()
in a2d2_helpers.py
18 7 1
def _parse_coco_ann_info()
in a2d2/a2d2_database.py
30 7 1
def parse_args()
in container_training/train.py
72 6 0
def show()
in a2d2/a2d2_dataset.py
37 6 5
def parse_args()
in docker/train.py
72 6 0
def undistort_image()
in a2d2_helpers.py
21 4 3
def remove_dontcare()
in a2d2/a2d2_dataset.py
9 4 2
def get_model()
in container_inference/mm3d/predictor.py
8 3 1
def generate_color_map()
in a2d2_helpers.py
5 3 1
def _poly2mask()
in a2d2/a2d2_database.py
10 3 3
def get_ann_info()
in a2d2/a2d2_dataset.py
33 3 2
def drop_arrays_by_name()
in a2d2/a2d2_dataset.py
4 3 3
def keep_arrays_by_name()
in a2d2/a2d2_dataset.py
4 3 3