awslabs / spot-tagging-bot-for-digital-assets
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 63 units with 1,034 lines of code in units (30.3% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (140 lines of code)
    • 15 medium size units (494 lines of code)
    • 16 small units (238 lines of code)
    • 30 very small units (162 lines of code)
0% | 13% | 47% | 23% | 15%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 13% | 47% | 23% | 15%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
source/sam_spot_bot_create_job0% | 14% | 44% | 25% | 15%
source/sam_spot_bot_api_receiver0% | 0% | 85% | 0% | 14%
source/sam_spot_bot_function0% | 0% | 100% | 0% | 0%
source/sam_spot_bot_get_job_status0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def __init__()
in source/sam_spot_bot_create_job/stepfunction_controller.py
85 3 1
def create_default_bots()
in source/sam_spot_bot_create_job/bot_dao.py
55 3 1
def lambda_handler()
in source/sam_spot_bot_api_receiver/app.py
48 1 2
def create_compute_environment()
in source/sam_spot_bot_create_job/batch_controller.py
47 8 1
def bot_cleanup()
in source/sam_spot_bot_create_job/sagemaker_controller.py
43 13 1
def __init__()
in source/sam_spot_bot_create_job/config.py
40 6 1
def deploy_sync()
in source/sam_spot_bot_create_job/sagemaker_controller.py
39 6 5
def search_file_list_for_bot()
in source/sam_spot_bot_create_job/job_dao.py
35 3 4
def lambda_handler()
in source/sam_spot_bot_function/app.py
34 5 2
def processing()
in source/sam_spot_bot_create_job/app.py
31 4 7
def create_job_queue()
in source/sam_spot_bot_create_job/batch_controller.py
31 6 1
def create_sf_instance()
in source/sam_spot_bot_create_job/stepfunction_controller.py
30 1 11
def update_bot_by_name()
in source/sam_spot_bot_create_job/bot_dao.py
29 1 11
def create_index()
in source/sam_spot_bot_create_job/bot_dao.py
24 2 1
def delete_endpoint()
in source/sam_spot_bot_create_job/sagemaker_controller.py
21 4 2
def get_bot_def()
in source/sam_spot_bot_create_job/bot_dao.py
21 2 2
def lambda_handler()
in source/sam_spot_bot_create_job/app.py
21 4 2
def _create_ecs_role()
in source/sam_spot_bot_create_job/iam_helper.py
20 1 1
def create_one_bot()
in source/sam_spot_bot_create_job/bot_dao.py
20 1 11
def connect_es()
in source/sam_spot_bot_create_job/elasticsearch_helper.py
17 3 1