awslabs / amazon-pollexy
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 283 units with 2,925 lines of code in units (76.8% of code).
    • 0 very long units (0 lines of code)
    • 5 long units (335 lines of code)
    • 28 medium size units (836 lines of code)
    • 65 small units (920 lines of code)
    • 185 very small units (834 lines of code)
0% | 11% | 28% | 31% | 28%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 11% | 28% | 31% | 28%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
cli0% | 36% | 3% | 29% | 29%
messages0% | 13% | 46% | 24% | 15%
ROOT0% | 100% | 0% | 0% | 0%
lex0% | 0% | 35% | 27% | 37%
scheduler0% | 0% | 45% | 51% | 2%
locator0% | 0% | 31% | 45% | 23%
lambda_functions0% | 0% | 39% | 35% | 24%
face0% | 0% | 56% | 16% | 27%
person0% | 0% | 21% | 42% | 36%
speaker0% | 0% | 38% | 30% | 30%
helpers0% | 0% | 19% | 19% | 60%
location0% | 0% | 0% | 63% | 36%
time_window0% | 0% | 0% | 42% | 57%
snippets0% | 0% | 0% | 46% | 53%
input0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def speak()
in cli/pollexy.py
89 19 9
def publish_message()
in messages/message_manager.py
71 9 2
def message_schedule()
in cli/pollexy.py
63 8 16
def queue()
in cli/pollexy.py
61 10 3
def handler()
in queue_messages.py
51 8 2
def __init__()
in messages/message.py
50 9 2
def queue_message()
in lambda_functions/queue_immediate.py
50 7 2
def get_user_input()
in lex/__init__.py
46 19 1
def get_messages()
in messages/message_manager.py
46 7 2
def __init__()
in messages/message.py
35 5 2
def next_occurrence()
in messages/message.py
34 12 1
def get_messages()
in scheduler/scheduler.py
34 8 4
def update_person()
in person/person.py
31 5 2
def create_schedule_table()
in scheduler/scheduler.py
31 1 1
def update_alias()
in lex/__init__.py
30 3 3
def get_user_input()
in lex/__init__.py
29 9 1
def upsert()
in lex/__init__.py
28 8 2
def convert_to_loc_avail()
in locator/locator.py
28 8 2
def __str__()
in messages/message.py
28 6 1
def __init__()
in lex/__init__.py
27 5 2