aws-amplify / amplify-ci-support
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 295 units with 3,369 lines of code in units (50.6% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (28 lines of code)
    • 4 simple units (94 lines of code)
    • 290 very simple units (3,247 lines of code)
0% | 0% | <1% | 2% | 96%
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% | <1% | 2% | 96%
js0% | 0% | 0% | 51% | 48%
ts0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
release_artifacts_resources/ios/cdk0% | 0% | 11% | 8% | 79%
integ_test_resources/android/sdk0% | 0% | 0% | 16% | 83%
integ_test_resources/ios/sdk0% | 0% | 0% | 1% | 98%
credentials_rotators/npm/lambda_functions0% | 0% | 0% | 0% | 100%
build_infrastructure/android/stacks0% | 0% | 0% | 0% | 100%
integ_test_resources/android/amplify0% | 0% | 0% | 0% | 100%
integ_test_resources/common0% | 0% | 0% | 0% | 100%
build_infrastructure/android/amplify_custom_resources0% | 0% | 0% | 0% | 100%
credentials_rotators/npm-token-rotation/src0% | 0% | 0% | 0% | 100%
credentials_rotators/npm/stacks0% | 0% | 0% | 0% | 100%
integ_test_resources/common/scripts0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def handler()
in src/release_artifacts_resources/ios/cdk/cdk/credential_rotation/lambda_functions/src/handler.py
28 11 6
def retry()
in src/release_artifacts_resources/ios/cdk/cdk/credential_rotation/lambda_functions/src/utils/retry.py
22 6 3
def __init__()
in src/integ_test_resources/android/sdk/integration/cdk/cdk_integration_tests_android/s3_stack.py
24 6 5
def __init__()
in src/integ_test_resources/android/sdk/integration/cdk/cdk_integration_tests_android/apigateway_stack.py
33 6 5
exports.handler = function()
in src/integ_test_resources/ios/sdk/integration/cdk/custom_resources/custom_auth/define_auth_challenge.js
15 6 2
def add_package_data()
in src/integ_test_resources/common/scripts/device_config_builder.py
12 5 4
def setup_custom_authorizer()
in src/integ_test_resources/ios/sdk/integration/cdk/cdk_integration_tests_ios/iot_stack.py
62 5 1
def rotate()
in src/credentials_rotators/npm/lambda_functions/secret_rotator.py
12 5 1
def check_secret_versions()
in src/credentials_rotators/npm/lambda_functions/secret_rotator.py
15 5 1
def enable_cloudwatch_alarm_notifications()
in src/credentials_rotators/npm/stacks/common_stack.py
13 5 3
def __init__()
in src/build_infrastructure/android/stacks/maven_release_stack.py
35 4 5
def generate_session_credentials()
in src/release_artifacts_resources/ios/cdk/cdk/credential_rotation/lambda_functions/src/source_data_generator/aws_session_credential_source.py
18 4 3
def get_existing_app_id()
in src/integ_test_resources/android/amplify/integration/cdk/scripts/common.py
8 4 0
def build()
in src/integ_test_resources/android/amplify/integration/cdk/scripts/api.py
18 4 1
def replace_in_file()
in src/integ_test_resources/common/file_utils.py
17 4 3
def handler()
in src/integ_test_resources/ios/sdk/integration/cdk/lambda/echo.py
15 4 2
def on_event()
in src/integ_test_resources/ios/sdk/integration/cdk/custom_resources/iot_custom_authorizer_user_pass_provider/iot_custom_authorizer_user_pass_provider.py
10 4 2
def on_event()
in src/integ_test_resources/ios/sdk/integration/cdk/custom_resources/iot_endpoint/iot_endpoint_provider.py
10 4 2
def on_event()
in src/integ_test_resources/ios/sdk/integration/cdk/custom_resources/iot_custom_authorizer_key_provider/iot_custom_authorizer_key_provider.py
10 4 2
def on_event()
in src/integ_test_resources/ios/sdk/integration/cdk/custom_resources/iot_custom_authorizer_provider/iot_custom_authorizer_provider.py
10 4 2