aws-samples / aws-athena-cqrs-pattern
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 9 units with 290 lines of code in units (49.2% of code).
    • 1 very long units (135 lines of code)
    • 1 long units (56 lines of code)
    • 1 medium size units (30 lines of code)
    • 4 small units (60 lines of code)
    • 2 very small units (9 lines of code)
46% | 19% | 10% | 20% | 3%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py46% | 19% | 10% | 20% | 3%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
aws_athena_cqrs_patterns100% | 0% | 0% | 0% | 0%
src/main/python/CommandHander0% | 100% | 0% | 0% | 0%
src/main/python/QueryResultsHandler0% | 0% | 30% | 60% | 9%
Alternative Visuals
Longest Units
Top 9 longest units
Unit# linesMcCabe index# params
def __init__()
in aws_athena_cqrs_patterns/aws_athena_cqrs_patterns_stack.py
135 4 4
def lambda_handler()
in src/main/python/CommandHander/command_handler.py
56 5 2
def lambda_handler()
in src/main/python/QueryResultsHandler/query_results_handler.py
30 5 2
def send_email()
in src/main/python/QueryResultsHandler/query_results_handler.py
17 1 4
def get_user_id_by_query_id()
in src/main/python/QueryResultsHandler/query_results_handler.py
16 4 2
def update_query_status()
in src/main/python/QueryResultsHandler/query_results_handler.py
16 3 4
def create_presigned_url()
in src/main/python/QueryResultsHandler/query_results_handler.py
11 2 3
def get_athena_query_result_location()
in src/main/python/QueryResultsHandler/query_results_handler.py
7 1 1
def gen_html()
in src/main/python/QueryResultsHandler/query_results_handler.py
2 1 1