awslabs / aws-emr-launch
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 218 units with 2,148 lines of code in units (45.6% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 3 medium complex units (193 lines of code)
    • 5 simple units (169 lines of code)
    • 210 very simple units (1,786 lines of code)
0% | 0% | 8% | 7% | 83%
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% | 8% | 7% | 83%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
aws_emr_launch/lambda_sources/emr_utilities0% | 0% | 52% | 25% | 22%
aws_emr_launch/constructs/emr_constructs0% | 0% | 0% | 11% | 88%
aws_emr_launch/constructs/iam_roles0% | 0% | 0% | 18% | 81%
aws_emr_launch/constructs/step_functions0% | 0% | 0% | 0% | 100%
aws_emr_launch/constructs/lambdas0% | 0% | 0% | 0% | 100%
aws_emr_launch/control_plane/constructs0% | 0% | 0% | 0% | 100%
aws_emr_launch/constructs/managed_configurations0% | 0% | 0% | 0% | 100%
aws_emr_launch/control_plane/lambda_sources0% | 0% | 0% | 0% | 100%
extras/airflow0% | 0% | 0% | 0% | 100%
aws_emr_launch/constructs/security_groups0% | 0% | 0% | 0% | 100%
aws_emr_launch/constructs0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def handler()
in aws_emr_launch/lambda_sources/emr_utilities/override_cluster_configs/lambda_source.py
43 20 4
def handler()
in aws_emr_launch/lambda_sources/emr_utilities/run_job_flow/lambda_source.py
71 13 4
def handler()
in aws_emr_launch/lambda_sources/emr_utilities/load_cluster_configuration/lambda_source.py
79 11 4
def handler()
in aws_emr_launch/lambda_sources/emr_utilities/fail_if_cluster_running/lambda_source.py
32 10 4
def visit()
in aws_emr_launch/constructs/iam_roles/permission_boundary_aspect.py
23 10 2
def handler()
in aws_emr_launch/lambda_sources/emr_utilities/check_cluster_status/lambda_source.py
61 9 4
def _construct_security_configuration()
in aws_emr_launch/constructs/emr_constructs/emr_profile.py
32 6 3
def add_spark_jars()
in aws_emr_launch/constructs/emr_constructs/cluster_configuration.py
21 6 3
def handler()
in aws_emr_launch/lambda_sources/emr_utilities/override_step_args/lambda_source.py
16 5 4
def handler()
in aws_emr_launch/lambda_sources/emr_utilities/update_cluster_tags/lambda_source.py
16 5 4
def get_secret_value()
in aws_emr_launch/lambda_sources/emr_utilities/run_job_flow/lambda_source.py
17 5 1
def _render_task_base()
in aws_emr_launch/constructs/step_functions/emr_tasks.py
11 5 1
def to_json()
in aws_emr_launch/constructs/step_functions/emr_launch_function.py
21 5 1
def from_json()
in aws_emr_launch/constructs/step_functions/emr_launch_function.py
30 5 3
def resolve()
in aws_emr_launch/constructs/emr_constructs/emr_code.py
13 5 2
def to_json()
in aws_emr_launch/constructs/emr_constructs/emr_profile.py
35 5 1
def from_json()
in aws_emr_launch/constructs/emr_constructs/emr_profile.py
49 5 3
def set_s3_encryption()
in aws_emr_launch/constructs/emr_constructs/emr_profile.py
17 5 3
def poke()
in extras/airflow/aws_operators_plugin.py
11 4 2
def get_profile_handler()
in aws_emr_launch/control_plane/lambda_sources/apis/get_list_apis.py
16 4 4