aws-samples / aws-open-data-satellite-lidar-tutorial
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 458 units with 9,427 lines of code in units (81.9% of code).
    • 1 very complex units (175 lines of code)
    • 7 complex units (609 lines of code)
    • 72 medium complex units (3,542 lines of code)
    • 78 simple units (2,220 lines of code)
    • 300 very simple units (2,881 lines of code)
1% | 6% | 37% | 23% | 30%
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
py1% | 6% | 37% | 23% | 30%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
libs/apls4% | 9% | 43% | 20% | 21%
libs/solaris/data0% | 50% | 31% | 0% | 18%
libs/solaris/utils0% | 4% | 34% | 35% | 25%
libs/solaris/vector0% | 0% | 57% | 24% | 18%
libs/solaris/nets0% | 0% | 20% | 22% | 56%
libs/solaris/eval0% | 0% | 50% | 39% | 10%
libs/solaris/tile0% | 0% | 45% | 34% | 20%
libs/solaris/raster0% | 0% | 47% | 0% | 52%
libs/apls/utils0% | 0% | 0% | 38% | 61%
networks0% | 0% | 0% | 7% | 92%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def make_graphs_yuge()
in libs/apls/apls.py
175 51 10
def wkt_to_G()
in libs/apls/wkt_to_G.py
114 36 1
def G_to_wkt()
in libs/apls/skeletonize.py
66 33 5
def geojson2coco()
in libs/solaris/data/coco.py
162 31 16
def path_sim_metric()
in libs/apls/apls.py
75 29 8
def insert_point_into_G()
in libs/apls/apls.py
139 28 5
def reorder_axes()
in libs/solaris/utils/raster.py
32 27 2
def is_endpoint()
in libs/apls/osmnx_funcs.py
21 27 3
def instance_mask()
in libs/solaris/vector/mask.py
60 25 8
def make_graphs()
in libs/apls/apls.py
119 25 12
def train()
in libs/solaris/nets/train.py
81 24 1
def tile_generator()
in libs/solaris/tile/raster_tile.py
111 24 8
def parse_OGR_nodes_paths()
in libs/apls/graphTools.py
62 22 4
def simplify_graph()
in libs/apls/osmnx_funcs.py
46 21 3
def eval_iou_return_GDFs()
in libs/solaris/eval/base.py
86 20 6
def graph_to_geojson()
in libs/solaris/vector/graph.py
42 20 5
def create_graph_midpoints()
in libs/apls/apls.py
59 20 7
def remove_small_terminal()
in libs/apls/skeletonize.py
35 20 6
def project_graph()
in libs/apls/osmnx_funcs.py
48 20 3
def stitch_images()
in libs/solaris/raster/image.py
56 19 6