aws-samples / voice-enabled-patient-diary
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 95 units with 1,099 lines of code in units (75.2% of code).
    • 1 very long units (110 lines of code)
    • 0 long units (0 lines of code)
    • 14 medium size units (413 lines of code)
    • 16 small units (233 lines of code)
    • 64 very small units (343 lines of code)
10% | 0% | 37% | 21% | 31%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts73% | 0% | 0% | 0% | 26%
py0% | 0% | 43% | 24% | 31%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lib81% | 0% | 0% | 0% | 18%
lambda/src0% | 0% | 64% | 11% | 23%
lambda/src/data_access0% | 0% | 25% | 34% | 40%
lambda/src/common0% | 0% | 0% | 54% | 46%
lib/defaults0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
constructor()
in lib/epro-voice-stack.ts
110 3 3
def report_symptom()
in lambda/src/gather_symptom_bot.py
50 16 1
def validate_symptom_input()
in lambda/src/gather_symptom_bot.py
39 10 4
def schedule_outreach_for_participant()
in lambda/src/outreach_scanner.py
37 7 4
def send_email()
in lambda/src/data_access/send_email.py
36 2 4
def verify_identity()
in lambda/src/verify_identity_bot.py
33 3 1
def parse_time_input()
in lambda/src/medication_diary_bot.py
31 11 3
def send_sms()
in lambda/src/data_access/send_sms.py
27 2 2
def validate_medication_time()
in lambda/src/medication_diary_bot.py
27 6 4
def lambda_handler()
in lambda/src/initiate_outbound_call.py
24 2 2
def no_symptom()
in lambda/src/gather_symptom_bot.py
23 5 1
def lambda_handler()
in lambda/src/check_survey_completion.py
22 5 2
def update_survey_completion()
in lambda/src/data_access/survey_completion.py
22 6 4
def medication_time()
in lambda/src/medication_diary_bot.py
21 3 1
def fall_back()
in lambda/src/gather_symptom_bot.py
21 9 1
def query_item_ddb()
in lambda/src/data_access/ddb_util.py
19 5 3
def scan_item_ddb()
in lambda/src/data_access/ddb_util.py
19 5 3
def get_item_ddb()
in lambda/src/data_access/ddb_util.py
19 6 3
def lambda_handler()
in lambda/src/notify_provider.py
18 2 2
def no_med()
in lambda/src/medication_diary_bot.py
16 2 1