aws-samples / mwaa-dashboard
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 205 lines of code in units (27.3% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (87 lines of code)
    • 1 medium size units (22 lines of code)
    • 4 small units (70 lines of code)
    • 8 very small units (26 lines of code)
0% | 42% | 10% | 34% | 12%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 42% | 10% | 34% | 12%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
functions/create_alarms0% | 96% | 0% | 0% | 3%
functions/seed_dynamodb0% | 0% | 100% | 0% | 0%
functions/delete_alarms0% | 0% | 0% | 71% | 28%
functions/delete_dashboard0% | 0% | 0% | 85% | 14%
functions/create_dashboard0% | 0% | 0% | 85% | 15%
functions/backup_dashboard0% | 0% | 0% | 83% | 16%
functions/restore_dashboard0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 14 longest units
Unit# linesMcCabe index# params
def lambda_handler()
in functions/create_alarms/app.py
87 4 2
def lambda_handler()
in functions/seed_dynamodb/app.py
22 3 2
def lambda_handler()
in functions/delete_alarms/app.py
20 7 2
def lambda_handler()
in functions/delete_dashboard/app.py
18 7 2
def lambda_handler()
in functions/create_dashboard/app.py
17 4 2
def lambda_handler()
in functions/backup_dashboard/app.py
15 2 2
def has_tag_with_value_in_list()
in functions/delete_alarms/app.py
5 4 3
def default()
in functions/create_alarms/app.py
3 2 1
def default()
in functions/restore_dashboard/app.py
3 2 1
def lambda_handler()
in functions/restore_dashboard/app.py
3 1 2
def default()
in functions/delete_dashboard/app.py
3 2 1
def default()
in functions/backup_dashboard/app.py
3 2 1
def default()
in functions/delete_alarms/app.py
3 2 1
def default()
in functions/create_dashboard/app.py
3 2 1