aws-samples / biotech-blueprint-multi-account
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 15 units with 769 lines of code in units (79.6% of code).
    • 4 very long units (542 lines of code)
    • 1 long units (55 lines of code)
    • 3 medium size units (97 lines of code)
    • 4 small units (63 lines of code)
    • 3 very small units (12 lines of code)
70% | 7% | 12% | 8% | 1%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts82% | 0% | 10% | 5% | <1%
py0% | 47% | 23% | 21% | 6%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lib82% | 0% | 10% | 5% | <1%
scripts0% | 47% | 23% | 21% | 6%
Alternative Visuals
Longest Units
Top 15 longest units
Unit# linesMcCabe index# params
constructor()
in lib/identity-stack.ts
183 1 3
constructor()
in lib/transit-stack.ts
131 1 3
constructor()
in lib/bb-20-stack.ts
116 5 3
constructor()
in lib/transitvpn-stack.ts
112 1 3
def main()
in scripts/ad-connector-resource-handler.py
55 5 2
constructor()
in lib/ad-connector.ts
45 1 3
def createCert()
in scripts/vpn-endpoint-security-resource-handler.py
27 2 2
constructor()
in lib/transitvpn-stack.ts
25 1 3
constructor()
in lib/vpcRouteTableTransitRoute.ts
19 2 3
constructor()
in lib/transitroutes-stack.ts
19 1 3
def runCommandSet()
in scripts/vpn-endpoint-security-resource-handler.py
14 2 2
def deleteCert()
in scripts/vpn-endpoint-security-resource-handler.py
11 2 2
def main()
in scripts/vpn-endpoint-security-resource-handler.py
6 3 2
constructor()
in lib/bb-20-master-stack.ts
4 1 3
def get_bytes_from_file()
in scripts/vpn-endpoint-security-resource-handler.py
2 1 1