aws-samples / aws-analytics-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 437 units with 7,558 lines of code in units (63.6% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (109 lines of code)
    • 5 medium complex units (274 lines of code)
    • 21 simple units (1,122 lines of code)
    • 410 very simple units (6,053 lines of code)
0% | 1% | 3% | 14% | 80%
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
java0% | 7% | 0% | 13% | 79%
py0% | 0% | 4% | 13% | 82%
ts0% | 0% | 4% | 22% | 73%
scala0% | 0% | 10% | 2% | 87%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
core/src/db-schema-manager0% | 9% | 0% | 14% | 76%
refarch/aws-native/batch0% | 0% | 30% | 0% | 69%
refarch/aws-native/common0% | 0% | 4% | 7% | 88%
core/src/notebook-platform0% | 0% | 26% | 32% | 41%
refarch/aws-native/streaming0% | 0% | 0% | 28% | 71%
core/src0% | 0% | 0% | 65% | 34%
core/src/emr-eks-platform0% | 0% | 0% | 19% | 80%
refarch/aws-native/dwh0% | 0% | 0% | 10% | 89%
core/src/data-generator0% | 0% | 0% | 9% | 90%
refarch/aws-native/dataviz0% | 0% | 0% | 4% | 95%
core/src/synchronous-athena-query0% | 0% | 0% | 0% | 100%
core/src/synchronous-crawler0% | 0% | 0% | 0% | 100%
core/src/datasets0% | 0% | 0% | 0% | 100%
refarch/aws-native/cicd0% | 0% | 0% | 0% | 100%
core/src/common0% | 0% | 0% | 0% | 100%
refarch/aws-native0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
public Flyway configure()
in core/src/db-schema-manager/resources/flyway-lambda/src/main/java/com/geekoosh/flyway/FlywayService.java
109 33 0
def main()
in refarch/aws-native/batch/glue-scripts/raw2clean_hudi.py
86 22 0
def main()
in refarch/aws-native/batch/glue-scripts/raw2clean_parquet.py
40 14 0
public addUser()
in core/src/notebook-platform/notebook-platform.ts
72 13 1
def handler()
in refarch/aws-native/common/common_cdk/lambda/stepfunctions_terminate_emr.py
24 11 2
def main()
in refarch/aws-native/common/data-generator/src/main/scala/DataGenerator.scala
52 11 1
def __init__()
in refarch/aws-native/common/common_cdk/data_lake.py
89 9 4
def handler()
in refarch/aws-native/dwh/dwh_cdk/bootstrap_lambda/redshift_setup.py
61 9 2
def is_complete()
in core/src/emr-eks-platform/resources/lambdas/managed-endpoint/lambda.py
33 9 2
public static R value()
in core/src/db-schema-manager/resources/flyway-lambda/src/main/java/com/geekoosh/flyway/request/ValueManager.java
13 9 4
public void process()
in refarch/aws-native/streaming/stream-processing/src/main/java/com/amazonaws/ara/http/AWSRequestSigningApacheInterceptor.java
42 8 2
public addManagedEndpoint()
in core/src/emr-eks-platform/emr-eks-cluster.ts
30 8 3
constructor()
in core/src/notebook-platform/notebook-platform.ts
87 8 3
def __init__()
in refarch/aws-native/streaming/streaming_cdk/es_domain.py
196 7 7
def find_auth_provider()
in refarch/aws-native/streaming/streaming_cdk/cognito-lambda/handler.py
18 7 2
public addNodegroupCapacity()
in core/src/emr-eks-platform/emr-eks-cluster.ts
71 7 2
constructor()
in core/src/data-lake-storage.ts
77 7 3
constructor()
in core/src/data-lake-exporter.ts
137 7 3
public MigrationInfoService call()
in core/src/db-schema-manager/resources/flyway-lambda/src/main/java/com/geekoosh/flyway/FlywayService.java
28 7 0
public Response handleRequest()
in core/src/db-schema-manager/resources/flyway-lambda/src/main/java/com/geekoosh/flyway/FlywayHandler.java
36 7 2