awslabs / aws-config-rdk
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 264 units with 4,329 lines of code in units (74.8% of code).
    • 0 very complex units (0 lines of code)
    • 3 complex units (789 lines of code)
    • 20 medium complex units (1,296 lines of code)
    • 13 simple units (393 lines of code)
    • 228 very simple units (1,851 lines of code)
0% | 18% | 29% | 9% | 42%
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% | 20% | 31% | 10% | 38%
js0% | 0% | 47% | 0% | 52%
cs0% | 0% | 0% | 0% | 100%
java0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
rdk0% | 28% | 31% | 10% | 29%
rdk/template/runtime/python3.6-managed0% | 0% | 43% | 0% | 56%
rdk/template/runtime/python3.70% | 0% | 30% | 12% | 57%
rdk/template/runtime/python3.80% | 0% | 30% | 12% | 57%
rdk/template/runtime/python3.60% | 0% | 30% | 12% | 57%
rdk/template/runtime/python3.90% | 0% | 30% | 12% | 57%
rdk/template/runtime/nodejs4.30% | 0% | 47% | 0% | 52%
rdk/template/runtime/dotnetcore2.00% | 0% | 0% | 0% | 100%
rdk/template/runtime/dotnetcore1.00% | 0% | 0% | 0% | 100%
rdk/template/runtime/java80% | 0% | 0% | 0% | 100%
rdk/template/runtime/python3.7-lib0% | 0% | 0% | 0% | 100%
rdk/template/runtime/python3.9-lib0% | 0% | 0% | 0% | 100%
rdk/template/runtime/python3.6-lib0% | 0% | 0% | 0% | 100%
rdk/template/runtime/python3.8-lib0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def init()
in rdk/rdk.py
130 34 1
def deploy()
in rdk/rdk.py
407 33 1
252 31 1
def lambda_handler()
in rdk/template/runtime/python3.7/rule_code.py
69 25 2
def lambda_handler()
in rdk/template/runtime/python3.8/rule_code.py
69 25 2
def lambda_handler()
in rdk/template/runtime/python3.6/rule_code.py
69 25 2
def lambda_handler()
in rdk/template/runtime/python3.9/rule_code.py
69 25 2
def modify()
in rdk/rdk.py
39 24 1
46 22 2
231 20 1
def create()
in rdk/rdk.py
72 17 1
34 16 2
157 16 1
def export()
in rdk/rdk.py
76 14 1
def main()
in rdk/cli.py
30 13 0
def undeploy()
in rdk/rdk.py
37 13 1
37 13 1
exports.lambda_handler = function()
in rdk/template/runtime/nodejs4.3/rule_code.js
64 13 3
def rule_handler()
in rdk/template/runtime/python3.6-managed/managed-rule-code/rule_code.py
42 12 1
def rule_handler()
in rdk/template/runtime/python3.6-managed/managed-rule-code/rule_util.py
42 12 1