aws-samples / amazon-sagemaker-built-in-algorithms-mlops-pipeline-using-aws-cdk
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 56 units with 892 lines of code in units (81.8% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (33 lines of code)
    • 1 simple units (24 lines of code)
    • 54 very simple units (835 lines of code)
0% | 0% | 3% | 2% | 93%
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
ts0% | 0% | 4% | 3% | 92%
py0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lib/template/pattern0% | 0% | 10% | 0% | 89%
lib/template0% | 0% | 0% | 29% | 70%
infra/stack/mlops0% | 0% | 0% | 0% | 100%
lib/template/stack0% | 0% | 0% | 0% | 100%
codes/lambda/mlops-trigger-statemachine0% | 0% | 0% | 0% | 100%
lib/template/construct0% | 0% | 0% | 0% | 100%
codes/lambda/mlops-query-accuracy0% | 0% | 0% | 0% | 100%
codes/lambda/mlops-query-endpoint0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
private createLambda()
in lib/template/pattern/lambda-construct.ts
33 11 4
private updateContextArgs()
in lib/template/app-context.ts
24 7 3
def handle()
in codes/lambda/mlops-query-accuracy/src/handler.py
22 5 2
private loadConfig()
in lib/template/app-context.ts
20 5 3
private createStateMachine()
in infra/stack/mlops/mlops-pipeline-stack.ts
125 5 1
def handle()
in codes/lambda/mlops-query-endpoint/src/handler.py
18 4 2
private loadLayers()
in lib/template/pattern/lambda-construct.ts
11 4 2
def trigger_statemachine()
in codes/lambda/mlops-trigger-statemachine/src/handler.py
9 3 4
def handle()
in codes/lambda/mlops-trigger-statemachine/src/handler.py
25 3 2
private createRole()
in lib/template/pattern/lambda-construct.ts
15 3 2
public createDynamoDBMetric()
in lib/template/pattern/cloudwatch-dashboard-construct.ts
16 3 4
public createLambdaMetric()
in lib/template/pattern/cloudwatch-dashboard-construct.ts
15 3 3
private addPrefixIntoStackName()
in lib/template/app-context.ts
7 3 1
public createIotMetric()
in lib/template/pattern/cloudwatch-dashboard-construct.ts
15 2 4
public createKinesisMetric()
in lib/template/pattern/cloudwatch-dashboard-construct.ts
13 2 3
public createEndpointInstanceMetrics()
in lib/template/pattern/cloudwatch-dashboard-construct.ts
18 2 4
public createEndpointInvocationMetrics()
in lib/template/pattern/cloudwatch-dashboard-construct.ts
18 2 4
public createEsDomainMetric()
in lib/template/pattern/cloudwatch-dashboard-construct.ts
16 2 4
public createEsDomainMetric2()
in lib/template/pattern/cloudwatch-dashboard-construct.ts
16 2 4
public createApiGatewayMetric()
in lib/template/pattern/cloudwatch-dashboard-construct.ts
14 2 3