aws-solutions / aws-firewall-manager-automations-for-aws-organizations
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 29 units with 1,574 lines of code in units (34.2% of code).
    • 5 very long units (1,265 lines of code)
    • 2 long units (121 lines of code)
    • 1 medium size units (37 lines of code)
    • 1 small units (11 lines of code)
    • 20 very small units (140 lines of code)
80% | 7% | 2% | <1% | 8%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts80% | 7% | 2% | <1% | 8%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
resources/lib95% | 4% | 0% | 0% | 0%
services/policyManager/lib0% | 56% | 0% | 0% | 43%
services/preReqManager/lib0% | 0% | 59% | 0% | 40%
services/complianceGenerator/lib0% | 0% | 0% | 27% | 72%
services/helper/lib0% | 0% | 0% | 0% | 100%
services/metricsManager0% | 0% | 0% | 0% | 100%
services/metricsManager/logger0% | 0% | 0% | 0% | 100%
services/helper0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
constructor()
in source/resources/lib/common.ts
296 2 2
constructor()
in source/resources/lib/policy.ts
296 2 3
constructor()
in source/resources/lib/prereq.ts
267 3 3
constructor()
in source/resources/lib/compliance.ts
263 3 3
constructor()
in source/resources/lib/iam.ts
143 1 3
constructor()
in source/resources/lib/demo.ts
63 2 2
static async getDDBItem()
in source/services/policyManager/lib/PolicyHelper.ts
58 4 3
private async getOrgRoot()
in source/services/preReqManager/lib/preReqManager.ts
37 4 0
for await()
in source/services/complianceGenerator/lib/ComplianceGenerator.ts
11 4 1
await got()
in source/services/metricsManager/index.ts
9 1 5
format: combine()
in source/services/metricsManager/logger/index.ts
9 1 1
format: combine()
in source/services/complianceGenerator/lib/common/logger/index.ts
9 1 1
format: combine()
in source/services/complianceGenerator/lib/common/logger/index.ts
9 1 1
format: combine()
in source/services/preReqManager/lib/common/logger/index.ts
9 1 1
await got()
in source/services/preReqManager/lib/common/metrics/index.ts
9 1 5
format: combine()
in source/services/policyManager/lib/common/logger/index.ts
9 1 1
format: combine()
in source/services/policyManager/lib/common/logger/index.ts
9 1 1
for await()
in source/services/policyManager/lib/PolicyHandler.ts
9 4 1
format: combine()
in source/services/helper/lib/common/logger/index.ts
9 1 1
await got()
in source/services/helper/lib/common/metrics/index.ts
9 1 5