aws-solutions / efs-backup
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 46 units with 561 lines of code in units (82.0% of code).
    • 1 very long units (103 lines of code)
    • 0 long units (0 lines of code)
    • 6 medium size units (157 lines of code)
    • 12 small units (166 lines of code)
    • 27 very small units (135 lines of code)
18% | 0% | 27% | 29% | 24%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py18% | 0% | 27% | 29% | 24%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
source51% | 0% | 38% | 0% | 10%
source/lib0% | 0% | 22% | 47% | 30%
source/scripts0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def lambda_handler()
in source/orchestrator.py
103 18 2
def efs_cw_metrics()
in source/lib/cloudwatch.py
29 4 3
def s3_cw_metrics()
in source/lib/cloudwatch.py
29 3 2
def lambda_handler()
in source/solution-helper.py
28 5 2
def send_anonymous_metric()
in source/solution-helper.py
27 2 6
def metrics()
in source/lib/notify.py
22 2 5
def send_response()
in source/solution-helper.py
22 2 4
def send_command()
in source/lib/ssm.py
19 2 4
def update_asg()
in source/lib/asg.py
16 4 2
def add_target()
in source/lib/events.py
16 2 3
def create_command()
in source/lib/ssm.py
14 4 2
def create_event()
in source/lib/events.py
14 2 2
def read_item()
in source/lib/dynamodb.py
14 2 3
def customer()
in source/lib/notify.py
13 2 3
def _format()
in source/lib/logger.py
13 3 2
def size()
in source/lib/efs.py
12 2 2
def performance_mode()
in source/lib/efs.py
12 2 2
def add_permission()
in source/lib/events.py
12 2 3
def remove_target()
in source/lib/events.py
11 2 1
def config()
in source/lib/logger.py
9 2 2