aws-samples / aws-service-catalog-reference-architectures
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 91 units with 1,389 lines of code in units (8.7% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (82 lines of code)
    • 5 medium complex units (323 lines of code)
    • 3 simple units (88 lines of code)
    • 82 very simple units (896 lines of code)
0% | 5% | 23% | 6% | 64%
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% | 6% | 25% | 6% | 61%
c0% | 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
bulkprovision0% | 12% | 27% | 8% | 51%
security0% | 0% | 29% | 6% | 63%
labs0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def HandleFailed()
in bulkprovision/bulkmonitor/__init__.py
82 29 1
def Run()
in bulkprovision/bulkmonitor/__init__.py
64 21 1
def ProvisionProducts()
in bulkprovision/bulkexecute/__init__.py
66 17 1
def handler()
in security/guardduty/index.py
51 16 2
def enable_gd_member()
in security/guardduty/index.py
92 14 4
def TerminateProducts()
in bulkprovision/bulkexecute/__init__.py
50 12 1
def enable_gd_master()
in security/guardduty/index.py
33 8 1
def lambdaLoops()
in bulkprovision/testlambdas.py
19 7 0
def RemoveEntries()
in bulkprovision/bulkmonitor/__init__.py
36 7 2
def lambda_handler()
in bulkprovision/lambda_email.py
33 5 2
def create_s3_destination()
in security/guardduty/index.py
159 5 1
def get_config_value()
in bulkprovision/common/__init__.py
9 4 2
def updateItem()
in bulkprovision/common/__init__.py
14 4 7
def monitor()
in bulkprovision/test.py
14 4 0
def handler()
in bulkprovision/lambda_startSF.py
25 4 2
double dot_product()
in labs/CalcAPI/src/calc.c
13 4 3
def _getrandom()
in labs/CalcAPI/remotetest.py
15 4 2
def cfnresponse()
in bulkprovision/common/__init__.py
17 3 6
def _load_config()
in bulkprovision/common/__init__.py
11 3 1
def dynamo_query()
in bulkprovision/common/__init__.py
9 3 3