aws-samples / aws-document-classifier-and-splitter
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 51 units with 769 lines of code in units (67.9% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 0 medium complex units (0 lines of code)
    • 3 simple units (114 lines of code)
    • 48 very simple units (655 lines of code)
0% | 0% | 0% | 14% | 85%
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% | 0% | 14% | 85%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
workflow3_local0% | 0% | 0% | 36% | 63%
workflow2_docsplitter/sam-app/functions/docsplitter_function0% | 0% | 0% | 0% | 100%
workflow1_endpointbuilder/sam-app/functions/function1_createtableandfunction3trigger0% | 0% | 0% | 0% | 100%
workflow1_endpointbuilder/sam-app/functions/function3_processobjectsandupdaterows0% | 0% | 0% | 0% | 100%
workflow2_docsplitter/sam-app/functions/getalbinfo_function0% | 0% | 0% | 0% | 100%
workflow1_endpointbuilder/sam-app/functions/function5_createcsv0% | 0% | 0% | 0% | 100%
workflow1_endpointbuilder/sam-app/functions/function4_checktablestatus0% | 0% | 0% | 0% | 100%
workflow1_endpointbuilder/sam-app/functions/function2_inserttablerowswithobjectkeys0% | 0% | 0% | 0% | 100%
workflow1_endpointbuilder/sam-app/functions/function7_checkclassifierstatus0% | 0% | 0% | 0% | 100%
workflow1_endpointbuilder/sam-app/functions/function6_trainclassifier0% | 0% | 0% | 0% | 100%
workflow2_docsplitter/sample_request_folder0% | 0% | 0% | 0% | 100%
workflow1_endpointbuilder/sam-app/functions/function9_checkendpointstatus0% | 0% | 0% | 0% | 100%
workflow1_endpointbuilder/sam-app/functions/function8_buildendpoint0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def get_processed_images()
in workflow3_local/local_endpointbuilder.py
15 8 1
def create_comprehend_role()
in workflow3_local/local_endpointbuilder.py
78 8 3
def add_image_to_csv()
in workflow3_local/local_endpointbuilder.py
21 6 2
def lambda_handler()
in workflow2_docsplitter/sam-app/functions/docsplitter_function/index.py
44 4 2
def send()
in workflow2_docsplitter/sam-app/functions/getalbinfo_function/index.py
25 4 7
def create_output_pdfs()
in workflow3_local/local_docsplitter.py
11 4 4
def get_endpoint_arn()
in workflow3_local/local_endpointbuilder.py
61 4 4
def create_csv()
in workflow1_endpointbuilder/sam-app/functions/function5_createcsv/index.py
21 4 2
def check_table()
in workflow1_endpointbuilder/sam-app/functions/function4_checktablestatus/index.py
22 4 2
def insert_table_rows()
in workflow1_endpointbuilder/sam-app/functions/function2_inserttablerowswithobjectkeys/index.py
22 4 3
def create_directories()
in workflow3_local/local_docsplitter.py
7 3 1
def main()
in workflow3_local/local_docsplitter.py
22 3 3
def lambda_handler()
in workflow1_endpointbuilder/sam-app/functions/function1_createtableandfunction3trigger/index.py
19 3 2
def process_file()
in workflow1_endpointbuilder/sam-app/functions/function3_processobjectsandupdaterows/index.py
16 3 3
def lambda_handler()
in workflow1_endpointbuilder/sam-app/functions/function3_processobjectsandupdaterows/index.py
7 3 2
def check_endpoint()
in workflow1_endpointbuilder/sam-app/functions/function9_checkendpointstatus/index.py
14 3 1
def check_classifier()
in workflow1_endpointbuilder/sam-app/functions/function7_checkclassifierstatus/index.py
14 3 1
def split_local_pdf()
in workflow2_docsplitter/sample_request_folder/sample_local_request.py
12 2 4
def split_s3_pdf()
in workflow2_docsplitter/sample_request_folder/sample_s3_request.py
9 2 4
def call_comprehend()
in workflow2_docsplitter/sam-app/functions/docsplitter_function/index.py
6 2 3