microsoft / ai4eutils
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 180 units with 2,343 lines of code in units (73.1% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 11 medium complex units (566 lines of code)
    • 23 simple units (546 lines of code)
    • 146 very simple units (1,231 lines of code)
0% | 0% | 24% | 23% | 52%
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% | 24% | 23% | 52%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ROOT0% | 0% | 31% | 17% | 50%
geospatial/visualization0% | 0% | 23% | 13% | 63%
azure-sdk-calc-storage-size0% | 0% | 25% | 7% | 67%
geospatial/data0% | 0% | 0% | 60% | 39%
geospatial/preprocessing0% | 0% | 0% | 65% | 34%
azure-metrics-calc-storage-size0% | 0% | 0% | 35% | 64%
geospatial/model_scoring0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def traverse_and_create_index()
in directory_listing.py
57 20 5
def write_html_image_list()
in write_html_image_list.py
102 20 3
def show_patch()
in geospatial/visualization/imagery_visualizer.py
38 19 12
def PrepareFolderDownload()
in gDrive_download.py
51 18 3
def create_plain_index()
in directory_listing.py
56 13 4
def walk_container()
in ai4e_azure_utils.py
37 12 6
def set_access_tier()
in parallel_change_blob_access_tier.py
50 12 3
def enumerate_prefix()
in parallel_enumerate_blobs.py
51 12 5
def list_blobs_in_container()
in parallel_enumerate_containers.py
47 12 5
def get_storage_size()
in azure-sdk-calc-storage-size/azure-data.py
50 11 2
def get_landsat8_ndvi()
in geospatial/visualization/imagery_visualizer.py
27 11 4
def download_url()
in ai4e_web_utils.py
21 10 6
def producer_func()
in parallel_change_blob_access_tier.py
26 10 2
def delete_blob()
in parallel_delete_blobs.py
23 10 2
def producer_func()
in parallel_delete_blobs.py
26 10 2
def human_readable_to_bytes()
in ai4e_string_utils.py
26 9 1
def stream_tile_fns()
in geospatial/data/StreamingDatasets.py
29 9 1
def mask_polygons_together_with_border()
in geospatial/preprocessing/create_label_masks.py
22 9 3
def top_level_folder()
in path_utils.py
19 9 2
def get_metric_data_capacity()
in azure-metrics-calc-storage-size/metrics-data.py
38 8 4