aws-solutions / aws-network-firewall-deployment-automations-for-aws-transit-gateway
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 55 units with 2,001 lines of code in units (89.4% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 4 medium complex units (258 lines of code)
    • 9 simple units (296 lines of code)
    • 42 very simple units (1,447 lines of code)
0% | 0% | 12% | 14% | 72%
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
ts0% | 0% | 12% | 14% | 72%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
source/networkFirewallAutomation/lib0% | 0% | 38% | 33% | 27%
source/networkFirewallAutomation/lib/common0% | 0% | 38% | 34% | 27%
source/networkFirewallAutomation0% | 0% | 0% | 83% | 16%
source/networkFirewallAutomation/lib/service0% | 0% | 0% | 8% | 91%
source/lib0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
async updateFirewall()
in source/networkFirewallAutomation/lib/network-firewall-manager.ts
46 15 2
async ruleGroupOperations()
in source/networkFirewallAutomation/lib/network-firewall-manager.ts
93 14 1
async execute()
in source/networkFirewallAutomation/lib/common/firewall-config-validation.ts
93 14 1
async checkExistingRoutes()
in source/networkFirewallAutomation/lib/ec2-manager.ts
26 13 1
async checkFirewallStatus()
in source/networkFirewallAutomation/lib/network-firewall-manager.ts
31 10 0
static async sendMetrics()
in source/networkFirewallAutomation/lib/common/send-metrics.ts
48 10 1
async validateRuleGroupFile()
in source/networkFirewallAutomation/lib/common/firewall-config-validation.ts
35 8 2
async function firewallManager()
in source/networkFirewallAutomation/index.ts
45 8 0
async deleteRuleGroups()
in source/networkFirewallAutomation/lib/network-firewall-manager.ts
21 7 1
async createLoggingConfigurations()
in source/networkFirewallAutomation/lib/network-firewall-manager.ts
44 7 0
async updateLoggingConfiguration()
in source/networkFirewallAutomation/lib/service/network-firewall-service.ts
26 6 2
async routeTableOperations()
in source/networkFirewallAutomation/lib/ec2-manager.ts
32 6 0
async checkRouteTable()
in source/networkFirewallAutomation/lib/ec2-manager.ts
14 6 1
async firewallOperations()
in source/networkFirewallAutomation/lib/network-firewall-manager.ts
26 5 0
async firewallPolicyOperations()
in source/networkFirewallAutomation/lib/network-firewall-manager.ts
34 5 1
async describeRuleGroup()
in source/networkFirewallAutomation/lib/service/network-firewall-service.ts
24 5 2
async updateRuleGroup()
in source/networkFirewallAutomation/lib/service/network-firewall-service.ts
19 5 1
async describeRouteTables()
in source/networkFirewallAutomation/lib/service/ec2-service.ts
28 4 1
async updateFirewallPolicy()
in source/networkFirewallAutomation/lib/service/network-firewall-service.ts
18 4 1
async listRuleGroupsForPolicy()
in source/networkFirewallAutomation/lib/service/network-firewall-service.ts
22 4 1