aws-samples / aws-service-catalog-terraform-reference-architecture
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 111 units with 1,042 lines of code in units (33.1% 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)
    • 4 simple units (112 lines of code)
    • 107 very simple units (930 lines of code)
0% | 0% | 0% | 10% | 89%
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% | 22% | 77%
java0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
TerraformScripts/sc_terraform_wrapper0% | 0% | 0% | 22% | 77%
TerraformCustomResourceHandler/src/main/java/com/amazon/servicecatalog/terraform/customresource0% | 0% | 0% | 0% | 100%
TerraformCustomResourceHandler/src/main/java/com/amazon/servicecatalog/terraform/customresource/facades0% | 0% | 0% | 0% | 100%
TerraformCustomResourceHandler/src/main/java/com/amazon/servicecatalog/terraform/customresource/fulfillment0% | 0% | 0% | 0% | 100%
TerraformCustomResourceHandler/src/main/java/com/amazon/servicecatalog/terraform/customresource/model0% | 0% | 0% | 0% | 100%
TerraformCustomResourceHandler/src/main/java/com/amazon/servicecatalog/terraform/customresource/util0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def run()
in TerraformScripts/sc_terraform_wrapper/__main__.py
59 9 6
def tag_resources_with_retry()
in TerraformScripts/sc_terraform_wrapper/terraform_tag.py
31 9 4
def validate_request_arg()
in TerraformScripts/sc_terraform_wrapper/__main__.py
9 7 1
def post_timeout_response()
in TerraformScripts/sc_terraform_wrapper/response_poster.py
13 6 2
def _post_response()
in TerraformScripts/sc_terraform_wrapper/response_poster.py
24 5 6
def load_config()
in TerraformScripts/sc_terraform_wrapper/sc_config.py
10 5 1
def get_s3_location()
in TerraformScripts/sc_terraform_wrapper/terraform_utils.py
15 5 1
def _generate_resource_arns()
in TerraformScripts/sc_terraform_wrapper/terraform_state.py
10 5 2
public void validateFields()
in TerraformCustomResourceHandler/src/main/java/com/amazon/servicecatalog/terraform/customresource/model/TerraformResourceProperties.java
17 5 0
private void bestEffortCheckWhetherCommandIsNotFound()
in TerraformCustomResourceHandler/src/main/java/com/amazon/servicecatalog/terraform/customresource/fulfillment/CommandSender.java
17 5 2
def download_artifact()
in TerraformScripts/sc_terraform_wrapper/__main__.py
16 4 5
def _get_outputs()
in TerraformScripts/sc_terraform_wrapper/terraform_state.py
6 4 1
def seconds_until_expiry()
in TerraformScripts/sc_terraform_wrapper/cfn_url_parser.py
16 4 1
public void handleRequest()
in TerraformCustomResourceHandler/src/main/java/com/amazon/servicecatalog/terraform/customresource/TerraformRequestHandler.java
30 4 3
private void verifyPreviousCommandCompletion()
in TerraformCustomResourceHandler/src/main/java/com/amazon/servicecatalog/terraform/customresource/fulfillment/CommandSender.java
21 4 0
def clean()
in TerraformScripts/sc_terraform_wrapper/__main__.py
7 3 1
def does_group_exist()
in TerraformScripts/sc_terraform_wrapper/terraform_resource_group.py
9 3 2
def delete_resource_group()
in TerraformScripts/sc_terraform_wrapper/terraform_resource_group.py
10 3 3
def _get_terraform_version()
in TerraformScripts/sc_terraform_wrapper/terraform_executor.py
16 3 1
def get_arn()
in TerraformScripts/sc_terraform_wrapper/arn_format.py
10 3 5