aws / aws-rfdk
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 655 units with 9,429 lines of code in units (69.3% of code).
    • 5 very long units (739 lines of code)
    • 23 long units (1,574 lines of code)
    • 101 medium size units (3,051 lines of code)
    • 142 small units (2,044 lines of code)
    • 384 very small units (2,021 lines of code)
7% | 16% | 32% | 21% | 21%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts8% | 17% | 32% | 21% | 21%
py0% | 0% | 39% | 35% | 24%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
packages/aws-rfdk8% | 15% | 35% | 20% | 19%
integ/lib29% | 39% | 14% | 10% | 6%
tools/pkglint0% | 15% | 25% | 20% | 37%
integ/components0% | 20% | 0% | 71% | 8%
integ/scripts0% | 0% | 47% | 40% | 12%
lambda-layers/lib0% | 0% | 74% | 0% | 25%
tools/cdk-build-tools0% | 0% | 14% | 25% | 60%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
constructor()
in packages/aws-rfdk/lib/deadline/lib/render-queue.ts
185 27 3
constructor()
in packages/aws-rfdk/lib/deadline/lib/repository.ts
160 26 3
constructor()
in integ/lib/storage-struct.ts
143 6 3
constructor()
in packages/aws-rfdk/lib/core/lib/pad-efs-storage.ts
127 2 3
constructor()
in packages/aws-rfdk/lib/deadline/lib/configure-spot-event-plugin.ts
124 11 3
with the Work to which such Contribution()
in tools/pkglint/lib/licensing.ts
94 17 1
institute patent litigation against any entity()
in tools/pkglint/lib/licensing.ts
93 17 1
constructor()
in packages/aws-rfdk/lib/deadline/lib/usage-based-licensing.ts
89 7 3
constructor()
in packages/aws-rfdk/lib/deadline/lib/worker-fleet.ts
88 8 3
constructor()
in packages/aws-rfdk/lib/core/lib/imported-acm-certificate.ts
88 2 3
private createTaskDefinition()
in packages/aws-rfdk/lib/deadline/lib/render-queue.ts
84 5 9
constructor()
in packages/aws-rfdk/lib/core/lib/mongodb-instance.ts
73 3 3
public registerWorkerFleet()
in packages/aws-rfdk/lib/core/lib/load-balancer-manager.ts
72 9 4
constructor()
in integ/lib/render-struct.ts
69 4 3
constructor()
in packages/aws-rfdk/lib/core/lib/x509-certificate.ts
68 8 3
public configureBastionUserData()
in integ/lib/testing-tier.ts
68 1 1
public mountToLinuxInstance()
in packages/aws-rfdk/lib/core/lib/mountable-efs.ts
65 9 2
public async doCreate()
in packages/aws-rfdk/lib/lambdas/nodejs/x509-certificate/handlers.ts
64 8 2
constructor()
in packages/aws-rfdk/lib/core/lib/x509-certificate.ts
62 2 3
constructor()
in packages/aws-rfdk/lib/deadline/lib/spot-event-plugin-fleet.ts
61 3 3