aws-samples / ci-cd-servicecatalog-ams
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 18 units with 768 lines of code in units (88.5% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (112 lines of code)
    • 1 simple units (17 lines of code)
    • 16 very simple units (639 lines of code)
0% | 0% | 14% | 2% | 83%
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% | 31% | 4% | 64%
ts0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src0% | 0% | 36% | 5% | 58%
lib/iam0% | 0% | 0% | 0% | 100%
lib/pipeline0% | 0% | 0% | 0% | 100%
lib/asset0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 18 most complex units
Unit# linesMcCabe index# params
def createProduct()
in src/servicecatalog.py
112 11 2
def checkProvisionProductStatus()
in src/servicecatalog.py
17 7 2
16 5 3
def deployStack()
in src/servicecatalog.py
29 5 1
def checkIfPortFolioExist()
in src/servicecatalog.py
23 4 1
def send()
in lib/asset/index.py
24 3 6
def __init__()
in src/servicecatalog.py
59 3 1
def checkVersion()
in src/servicecatalog.py
11 3 2
def uploadtoS3()
in lib/asset/index.py
15 2 4
def lambda_handler()
in lib/asset/index.py
9 2 2
def uploadArtifact()
in src/servicecatalog.py
28 2 1
constructor()
in lib/pipeline/s3SourceAction.ts
153 1 3
constructor()
in lib/iam/sclaunch.ts
117 1 3
constructor()
in lib/iam/iam.ts
51 1 3
constructor()
in lib/iam/snowrole.ts
63 1 3
constructor()
in lib/iam/lambda_role.ts
25 1 3
def provisionProduct()
in src/servicecatalog.py
8 1 2
def update_provisioned_product()
in src/servicecatalog.py
8 1 4