awslabs / amazon-s3-data-replication-hub-plugin
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 14 units with 1,018 lines of code in units (81.9% of code).
    • 4 very long units (793 lines of code)
    • 2 long units (151 lines of code)
    • 1 medium size units (32 lines of code)
    • 0 small units (0 lines of code)
    • 7 very small units (42 lines of code)
77% | 14% | 3% | 0% | 4%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts82% | 15% | 0% | 0% | 1%
py0% | 0% | 55% | 0% | 44%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
source/lib82% | 15% | 0% | 0% | 1%
source/lambda0% | 0% | 55% | 0% | 44%
Alternative Visuals
Longest Units
Top 14 longest units
Unit# linesMcCabe index# params
constructor()
in source/lib/main-stack.ts
329 6 3
constructor()
in source/lib/ec2-worker-stack.ts
182 4 3
constructor()
in source/lib/dashboard-stack.ts
150 1 3
constructor()
in source/lib/ecs-finder-stack.ts
132 6 3
constructor()
in source/lib/common-resources.ts
95 1 3
constructor()
in source/lib/event-stack.ts
56 1 3
def run_fargate()
in source/lambda/lambda_event_handler.py
32 4 1
def lambda_handler()
in source/lambda/lambda_event_handler.py
10 4 2
def on_create()
in source/lambda/lambda_event_handler.py
7 1 1
private addToParamGroups()
in source/lib/main-stack.ts
6 1 2
def on_update()
in source/lambda/lambda_event_handler.py
6 1 1
export function addCfnNagSuppressRules()
in source/lib/main-stack.ts
5 1 2
private addToParamLabels()
in source/lib/main-stack.ts
5 1 2
def on_delete()
in source/lambda/lambda_event_handler.py
3 1 1