aws-samples / aws-fault-injection-simulator-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 36 units with 1,259 lines of code in units (16.3% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (462 lines of code)
    • 4 simple units (102 lines of code)
    • 30 very simple units (695 lines of code)
0% | 0% | 36% | 8% | 55%
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% | 61% | 13% | 24%
ts0% | 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
resources/templates/goad-cdk0% | 0% | 61% | 14% | 24%
resources/templates/goad-redux0% | 0% | 62% | 13% | 24%
resources/templates/spot0% | 0% | 0% | 0% | 100%
resources/code/cdk0% | 0% | 0% | 0% | 100%
resources/templates/rds0% | 0% | 0% | 0% | 100%
resources/templates/eks0% | 0% | 0% | 0% | 100%
resources/templates/vpc0% | 0% | 0% | 0% | 100%
resources/templates/ecs0% | 0% | 0% | 0% | 100%
resources/templates/asg-cdk0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func launcher()
in resources/templates/goad-cdk/load-gen/loadgen.go
231 22 4
func launcher()
in resources/templates/goad-redux/go-lambda/load-gen/loadgen.go
231 22 4
func handler()
in resources/templates/goad-cdk/load-gen/main.go
32 10 1
func handler()
in resources/templates/goad-redux/go-lambda/load-gen/main.go
28 8 1
func main()
in resources/templates/goad-cdk/load-gen/main.go
21 6 0
func main()
in resources/templates/goad-redux/go-lambda/load-gen/main.go
21 6 0
constructor()
in resources/templates/rds/lib/fis-stack-rds-aurora.ts
64 5 3
func rlimitValidator()
in resources/templates/goad-cdk/load-gen/loadgen.go
23 5 1
func rlimitValidator()
in resources/templates/goad-redux/go-lambda/load-gen/loadgen.go
23 5 1
def check_interrupt_notice()
in resources/templates/spot/assets/send_metrics.py
22 4 0
def main()
in resources/code/cdk/cicd/resources/runExperiment.py
33 4 1
func runner()
in resources/templates/goad-cdk/load-gen/loadgen.go
46 3 4
func runner()
in resources/templates/goad-redux/go-lambda/load-gen/loadgen.go
46 3 4
def getExperimentTemplateID()
in resources/code/cdk/cicd/resources/runExperiment.py
7 3 1
def get_imsv2_token()
in resources/templates/spot/assets/send_metrics.py
14 2 0
def get_instance_id()
in resources/templates/spot/assets/send_metrics.py
15 2 0
func loadgen()
in resources/templates/goad-cdk/load-gen/loadgen.go
23 2 1
func loadgen()
in resources/templates/goad-redux/go-lambda/load-gen/loadgen.go
23 2 1
constructor()
in resources/templates/eks/lib/eks-stack.ts
59 2 3
def signal_handler()
in resources/templates/asg-cdk/assets/create_db.py
3 1 2