aws-samples / aws-cdk-intro-workshop
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 78 units with 968 lines of code in units (10.8% 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)
    • 0 simple units (0 lines of code)
    • 78 very simple units (968 lines of code)
0% | 0% | 0% | 0% | 100%
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% | 0% | 0% | 100%
java0% | 0% | 0% | 0% | 100%
py0% | 0% | 0% | 0% | 100%
cs0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
code/java0% | 0% | 0% | 0% | 100%
code/python0% | 0% | 0% | 0% | 100%
code/typescript0% | 0% | 0% | 0% | 100%
cdkworkshop.com0% | 0% | 0% | 0% | 100%
code/csharp0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
constructor()
in cdkworkshop.com/cdkworkshop.com.ts
81 4 3
public HitCounter()
in code/java/tests-workshop/src/main/java/com/myorg/HitCounter.java
28 4 3
function addFilesToHash()
in cdkworkshop.com/hash.ts
11 3 1
constructor()
in code/typescript/tests-workshop/lib/hitcounter.ts
23 3 3
constructor()
in cdkworkshop.com/guardduty.ts
15 2 3
public HitCounterProps build()
in code/java/main-workshop/src/main/java/com/myorg/HitCounterProps.java
11 2 0
public HitCounterProps build()
in code/java/pipelines-workshop/src/main/java/com/myorg/HitCounterProps.java
11 2 0
public HitCounterProps build()
in code/java/tests-workshop/src/main/java/com/myorg/HitCounterProps.java
15 2 0
constructor()
in cdkworkshop.com/cdkworkshop.com.ts
12 1 2
constructor()
in cdkworkshop.com/pipeline.ts
37 1 3
export function hashDirectorySync()
in cdkworkshop.com/hash.ts
5 1 1
public HitCounter()
in code/java/main-workshop/src/main/java/com/myorg/HitCounter.java
20 1 3
public Function getHandler()
in code/java/main-workshop/src/main/java/com/myorg/HitCounter.java
3 1 0
public Table getTable()
in code/java/main-workshop/src/main/java/com/myorg/HitCounter.java
3 1 0
public CdkWorkshopStack()
in code/java/main-workshop/src/main/java/com/myorg/CdkWorkshopStack.java
3 1 2
public CdkWorkshopStack()
in code/java/main-workshop/src/main/java/com/myorg/CdkWorkshopStack.java
18 1 3
public static Builder builder()
in code/java/main-workshop/src/main/java/com/myorg/HitCounterProps.java
3 1 0
public Builder downstream()
in code/java/main-workshop/src/main/java/com/myorg/HitCounterProps.java
4 1 1
public static void main()
in code/java/main-workshop/src/main/java/com/myorg/CdkWorkshopApp.java
5 1 1
public WorkshopPipelineStage()
in code/java/pipelines-workshop/src/main/java/com/myorg/WorkshopPipelineStage.java
3 1 2