aws-solutions / aws-streaming-data-solution-for-amazon-kinesis-and-amazon-msk
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 121 units with 3,956 lines of code in units (81.9% 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)
    • 2 simple units (44 lines of code)
    • 119 very simple units (3,912 lines of code)
0% | 0% | 0% | 1% | 98%
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% | 5% | 94%
ts0% | 0% | 0% | <1% | 99%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
source/lambda/solution-helper0% | 0% | 0% | 75% | 24%
source/lib0% | 0% | 0% | 1% | 98%
source/patterns0% | 0% | 0% | 0% | 100%
source/labs0% | 0% | 0% | 0% | 100%
source/lambda/msk-dashboard0% | 0% | 0% | 0% | 100%
source/lambda/cloud9-setup0% | 0% | 0% | 0% | 100%
source/lambda/kda-vpc-config0% | 0% | 0% | 0% | 100%
source/lambda/msk-metadata0% | 0% | 0% | 0% | 100%
source/lambda/kds-enhanced-monitoring0% | 0% | 0% | 0% | 100%
source/lambda/secrets-manager-metadata0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
private validateProps()
in source/lib/msk-cluster.ts
19 10 1
def custom_resource()
in source/lambda/solution-helper/lambda_function.py
25 6 2
def _create_metric_widget()
in source/lambda/msk-dashboard/lambda_function.py
31 5 2
constructor()
in source/lib/msk-consumer.ts
19 4 3
public static addSuppressions()
in source/lib/cfn-nag-helper.ts
24 4 2
def _get_bootstrap_brokers()
in source/lambda/msk-metadata/lambda_function.py
9 4 1
def _add_vpc_configuration()
in source/lambda/kda-vpc-config/lambda_function.py
10 4 3
private addSourceMetrics()
in source/lib/kda-monitoring.ts
32 3 2
private addFirehoseMetrics()
in source/lib/kdf-monitoring.ts
159 3 3
constructor()
in source/lib/kds-data-stream.ts
12 3 3
constructor()
in source/labs/msk-client-setup.ts
173 3 3
def _get_key_arn_for_secret()
in source/lambda/secrets-manager-metadata/lambda_function.py
13 3 1
def _create_iam_resources()
in source/lambda/cloud9-setup/lambda_function.py
49 3 0
constructor()
in source/lib/lambda-role-cloudwatch.ts
19 2 3
constructor()
in source/lib/msk-client.ts
36 2 3
private createWidgetWithoutUnits()
in source/lib/kdf-monitoring.ts
13 2 5
private addLambdaMetrics()
in source/lib/kds-monitoring.ts
63 2 1
protected createRole()
in source/lib/kda-flink-studio.ts
76 2 1
constructor()
in source/lib/s3-bucket.ts
45 2 3
protected createWidgetWithUnits()
in source/lib/monitoring-base.ts
6 2 2