aws-samples / getting-started-with-amazon-redshift-data-api
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 44 units with 938 lines of code in units (20.8% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (22 lines of code)
    • 5 medium complex units (244 lines of code)
    • 7 simple units (226 lines of code)
    • 31 very simple units (446 lines of code)
0% | 2% | 26% | 24% | 47%
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
js0% | 11% | 49% | 17% | 22%
go0% | 0% | 52% | 42% | 4%
java0% | 0% | 59% | 0% | 40%
py0% | 0% | 6% | 27% | 66%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
quick-start/typescript0% | 11% | 49% | 17% | 22%
quick-start/go0% | 0% | 52% | 42% | 4%
quick-start/java0% | 0% | 59% | 0% | 40%
quick-start/python0% | 0% | 52% | 47% | 0%
use-cases/lambda-chaining-with-redshift-data-api0% | 0% | 0% | 29% | 70%
use-cases/aws-lambda-redshift-event-driven-etl0% | 0% | 0% | 19% | 80%
use-cases/ec2-redshift-access0% | 0% | 0% | 33% | 66%
use-cases/etl-orchestration-with-lambda-and-step-functions0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
function step()
in quick-start/typescript/RedshiftDataAPI.js
22 32 1
var handler = function()
in quick-start/typescript/RedshiftDataAPI.js
50 17 1
var executeSynchronousWait = function()
in quick-start/typescript/RedshiftDataAPI.js
48 16 4
func execute_sql_data_api()
in quick-start/go/main.go
55 14 6
def execute_sql_data_api()
in quick-start/python/RedShiftDataAPI.py
36 12 7
private String executeSqlDataApi()
in quick-start/java/RedshiftDataAPI.java
55 11 8
def handler()
in use-cases/aws-lambda-redshift-event-driven-etl/LambdaRedshiftDataApiETL.py
26 10 2
def handler()
in use-cases/lambda-chaining-with-redshift-data-api/scripts/LambdaRedshiftDataApiUnload.py
32 10 2
def handler()
in use-cases/lambda-chaining-with-redshift-data-api/scripts/LambdaRedshiftDataApiETL.py
32 10 2
def lambda_handler()
in quick-start/python/RedShiftDataAPI.py
33 9 2
def run_sql()
in use-cases/ec2-redshift-access/scripts/redshift-data.py
24 8 1
var executeSqlDataApi = function()
in quick-start/typescript/RedshiftDataAPI.js
34 7 7
func HandleRequest()
in quick-start/go/main.go
45 6 2
public String handleRequest()
in quick-start/java/RedshiftDataAPI.java
38 5 2
def run_concurrency_test()
in use-cases/ec2-redshift-access/scripts/redshift-concurrency-test.py
17 4 1
next: function()
in quick-start/typescript/RedshiftDataAPI.js
4 4 0
def get_concurrency_scripts_from_s3()
in use-cases/ec2-redshift-access/scripts/redshift-concurrency-test.py
9 3 2
def execute_sql()
in use-cases/aws-lambda-redshift-event-driven-etl/LambdaRedshiftDataApiETL.py
14 3 6
def notify()
in use-cases/aws-lambda-redshift-event-driven-etl/LambdaRedshiftDataApiETL.py
13 3 3
def run_sql()
in use-cases/lambda-chaining-with-redshift-data-api/scripts/LambdaRedshiftDataApiUnload.py
16 3 6