aws-samples / aws-lambda-sample-applications
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 36 units with 386 lines of code in units (13.8% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 4 medium size units (140 lines of code)
    • 8 small units (138 lines of code)
    • 24 very small units (108 lines of code)
0% | 0% | 36% | 35% | 27%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts0% | 0% | 36% | 35% | 27%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
nodejs10.x/serverless-api-backend0% | 0% | 83% | 0% | 16%
nodejs14.x/serverless-api-backend0% | 0% | 83% | 0% | 16%
nodejs10.x/file-processing0% | 0% | 74% | 0% | 25%
nodejs14.x/file-processing0% | 0% | 74% | 0% | 25%
nodejs10.x/scheduled-job0% | 0% | 0% | 67% | 32%
nodejs14.x/scheduled-job0% | 0% | 0% | 67% | 32%
nodejs10.x/queue-processing0% | 0% | 0% | 66% | 33%
nodejs14.x/queue-processing0% | 0% | 0% | 66% | 33%
nodejs10.x/notifications-processing0% | 0% | 0% | 65% | 34%
nodejs14.x/notifications-processing0% | 0% | 0% | 65% | 34%
nodejs10.x/author-from-scratch0% | 0% | 0% | 62% | 37%
nodejs14.x/author-from-scratch0% | 0% | 0% | 62% | 37%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
constructor()
in nodejs10.x/serverless-api-backend/cdk/cdk/lib/cdk-stack.ts
44 1 3
constructor()
in nodejs14.x/serverless-api-backend/cdk/cdk/lib/cdk-stack.ts
44 1 3
constructor()
in nodejs10.x/file-processing/cdk/cdk/lib/cdk-stack.ts
26 1 3
constructor()
in nodejs14.x/file-processing/cdk/cdk/lib/cdk-stack.ts
26 1 3
constructor()
in nodejs10.x/scheduled-job/cdk/cdk/lib/cdk-stack.ts
19 1 3
constructor()
in nodejs14.x/scheduled-job/cdk/cdk/lib/cdk-stack.ts
19 1 3
constructor()
in nodejs10.x/queue-processing/cdk/cdk/lib/cdk-stack.ts
18 1 3
constructor()
in nodejs14.x/queue-processing/cdk/cdk/lib/cdk-stack.ts
18 1 3
constructor()
in nodejs10.x/notifications-processing/cdk/cdk/lib/cdk-stack.ts
17 1 3
constructor()
in nodejs14.x/notifications-processing/cdk/cdk/lib/cdk-stack.ts
17 1 3
constructor()
in nodejs10.x/author-from-scratch/cdk/cdk/lib/cdk-stack.ts
15 1 3
constructor()
in nodejs14.x/author-from-scratch/cdk/cdk/lib/cdk-stack.ts
15 1 3
public visit()
in nodejs10.x/scheduled-job/cdk/cdk/lib/permissions-boundary-aspect.ts
6 2 1
public visit()
in nodejs10.x/file-processing/cdk/cdk/lib/permissions-boundary-aspect.ts
6 2 1
public visit()
in nodejs10.x/author-from-scratch/cdk/cdk/lib/permissions-boundary-aspect.ts
6 2 1
public visit()
in nodejs10.x/serverless-api-backend/cdk/cdk/lib/permissions-boundary-aspect.ts
6 2 1
public visit()
in nodejs10.x/queue-processing/cdk/cdk/lib/permissions-boundary-aspect.ts
6 2 1
public visit()
in nodejs10.x/notifications-processing/cdk/cdk/lib/permissions-boundary-aspect.ts
6 2 1
public visit()
in nodejs14.x/scheduled-job/cdk/cdk/lib/permissions-boundary-aspect.ts
6 2 1
public visit()
in nodejs14.x/file-processing/cdk/cdk/lib/permissions-boundary-aspect.ts
6 2 1