aws-samples / cross-aws-sdk-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 152 units with 2,036 lines of code in units (55.4% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (48 lines of code)
    • 12 simple units (550 lines of code)
    • 139 very simple units (1,438 lines of code)
0% | 0% | 2% | 27% | 70%
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
go0% | 0% | 4% | 39% | 55%
ts0% | 0% | 0% | 26% | 73%
java0% | 0% | 0% | 0% | 100%
py0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lambda/go/add-podcasts0% | 0% | 15% | 41% | 42%
lib0% | 0% | 0% | 26% | 73%
lambda/go/process-transcription0% | 0% | 0% | 79% | 20%
lambda/go/start-transcription0% | 0% | 0% | 58% | 41%
lambda/go/upload-podcast0% | 0% | 0% | 70% | 29%
lambda/go/get-podcast0% | 0% | 0% | 68% | 31%
lambda/go/list-podcasts0% | 0% | 0% | 28% | 71%
lambda/go/play-podcast0% | 0% | 0% | 30% | 69%
lambda/go0% | 0% | 0% | 13% | 86%
lambda/java/src0% | 0% | 0% | 0% | 100%
lambda/python0% | 0% | 0% | 0% | 100%
lambda/go/update-episode-status0% | 0% | 0% | 0% | 100%
lambda/go/check-transcription0% | 0% | 0% | 0% | 100%
lambda/go/stub-function0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func()
in lambda/go/add-podcasts/main.go
48 11 1
func()
in lambda/go/upload-podcast/main.go
40 9 1
func()
in lambda/go/process-transcription/main.go
67 8 1
func()
in lambda/go/add-podcasts/main.go
44 8 1
func()
in lambda/go/add-podcasts/main.go
44 8 1
func()
in lambda/go/play-podcast/main.go
22 8 1
func()
in lambda/go/get-podcast/main.go
32 7 1
func parseEpisodeStatus()
in lambda/go/episode.go
18 7 1
165 6 3
func()
in lambda/go/list-podcasts/main.go
26 6 1
func()
in lambda/go/add-podcasts/main.go
27 6 1
func limitItems()
in lambda/go/add-podcasts/main.go
12 6 3
func()
in lambda/go/start-transcription/main.go
53 6 1
14 5 1
189 5 3
func getFilterExpressionFromQueryString()
in lambda/go/list-podcasts/main.go
11 5 1
func()
in lambda/go/add-podcasts/main.go
28 5 1
func contentTypeToMediaFormat()
in lambda/go/start-transcription/main.go
14 5 1
public APIGatewayV2HTTPResponse handleRequest()
in lambda/java/src/main/java/com/amazonaws/workshop/ListPodcasts.java
32 5 2
15 4 1