aws-quickstart / quickstart-agilisium-conversational-bot
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 66 units with 1,195 lines of code in units (68.8% of code).
    • 0 very long units (0 lines of code)
    • 4 long units (228 lines of code)
    • 16 medium size units (472 lines of code)
    • 24 small units (348 lines of code)
    • 22 very small units (147 lines of code)
0% | 19% | 39% | 29% | 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% | 15% | 42% | 31% | 10%
js0% | 38% | 23% | 15% | 22%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
assets/web/js0% | 38% | 23% | 15% | 22%
functions/source/bot_fulfillment0% | 14% | 41% | 27% | 17%
functions/source/bootstrap_redshift0% | 16% | 34% | 38% | 10%
functions/source/lex_custom_lambda0% | 16% | 51% | 28% | 3%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
function showResponse()
in assets/web/js/custom.js
65 22 1
def get_table_response()
in functions/source/bot_fulfillment/bot_fulfillment.py
55 19 7
def insert_records()
in functions/source/bootstrap_redshift/bootstrap_redshift.py
55 15 1
def lambda_handler()
in functions/source/lex_custom_lambda/lex_custom_lambda.py
53 11 2
def prepare_response()
in functions/source/bot_fulfillment/bot_fulfillment.py
46 11 4
function pushChat()
in assets/web/js/custom.js
39 6 0
def lambda_handler()
in functions/source/bootstrap_redshift/bootstrap_redshift.py
35 8 2
def process_request()
in functions/source/bot_fulfillment/bot_fulfillment.py
33 1 1
def create_bot()
in functions/source/lex_custom_lambda/chatbot_utils.py
32 8 2
def copy_webui_code()
in functions/source/lex_custom_lambda/lex_custom_lambda.py
29 5 1
def save_orders_data()
in functions/source/bootstrap_redshift/bootstrap_redshift.py
28 6 3
def validate_sales_metrics_performing_slots()
in functions/source/bot_fulfillment/bot_fulfillment.py
27 16 4
def get_text_response()
in functions/source/bot_fulfillment/bot_fulfillment.py
27 8 5
def send()
in functions/source/lex_custom_lambda/lex_custom_lambda.py
27 4 5
def validate_sales_metrics_general_slots()
in functions/source/bot_fulfillment/bot_fulfillment.py
26 15 4
def create_intents()
in functions/source/lex_custom_lambda/chatbot_utils.py
26 7 2
def create_tables()
in functions/source/bootstrap_redshift/bootstrap_redshift.py
26 2 1
def send()
in functions/source/bootstrap_redshift/bootstrap_redshift.py
25 4 5
def create_bot()
in functions/source/lex_custom_lambda/lex_custom_lambda.py
24 6 1
def create_slots()
in functions/source/lex_custom_lambda/chatbot_utils.py
22 7 2