aws-solutions / aws-network-firewall-deployment-automations-for-aws-transit-gateway
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 55 units with 2,001 lines of code in units (89.4% of code).
    • 1 very long units (991 lines of code)
    • 2 long units (186 lines of code)
    • 15 medium size units (488 lines of code)
    • 11 small units (167 lines of code)
    • 26 very small units (169 lines of code)
49% | 9% | 24% | 8% | 8%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts49% | 9% | 24% | 8% | 8%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
source/lib100% | 0% | 0% | 0% | 0%
source/networkFirewallAutomation/lib0% | 21% | 61% | 8% | 8%
source/networkFirewallAutomation/lib/common0% | 38% | 34% | 19% | 8%
source/networkFirewallAutomation/lib/service0% | 0% | 34% | 29% | 36%
source/networkFirewallAutomation0% | 0% | 83% | 0% | 16%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
constructor()
in source/lib/network-firewall-automation-solution-stack.ts
991 2 3
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
static async sendMetrics()
in source/networkFirewallAutomation/lib/common/send-metrics.ts
48 10 1
async updateFirewall()
in source/networkFirewallAutomation/lib/network-firewall-manager.ts
46 15 2
async function firewallManager()
in source/networkFirewallAutomation/index.ts
45 8 0
async createLoggingConfigurations()
in source/networkFirewallAutomation/lib/network-firewall-manager.ts
44 7 0
async validateRuleGroupFile()
in source/networkFirewallAutomation/lib/common/firewall-config-validation.ts
35 8 2
async firewallPolicyOperations()
in source/networkFirewallAutomation/lib/network-firewall-manager.ts
34 5 1
async routeTableOperations()
in source/networkFirewallAutomation/lib/ec2-manager.ts
32 6 0
async checkFirewallStatus()
in source/networkFirewallAutomation/lib/network-firewall-manager.ts
31 10 0
async describeRouteTables()
in source/networkFirewallAutomation/lib/service/ec2-service.ts
28 4 1
async firewallOperations()
in source/networkFirewallAutomation/lib/network-firewall-manager.ts
26 5 0
async updateLoggingConfiguration()
in source/networkFirewallAutomation/lib/service/network-firewall-service.ts
26 6 2
async checkExistingRoutes()
in source/networkFirewallAutomation/lib/ec2-manager.ts
26 13 1
async describeRuleGroup()
in source/networkFirewallAutomation/lib/service/network-firewall-service.ts
24 5 2
async listRuleGroupsForPolicy()
in source/networkFirewallAutomation/lib/service/network-firewall-service.ts
22 4 1
async deleteRuleGroups()
in source/networkFirewallAutomation/lib/network-firewall-manager.ts
21 7 1
async updateRuleGroup()
in source/networkFirewallAutomation/lib/service/network-firewall-service.ts
19 5 1
getUniqueResourceName()
in source/networkFirewallAutomation/lib/common/stringUtils.ts
19 4 1