aws-samples / cdk-graviton2-gh-sh-runner
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 56 units with 370 lines of code in units (62.9% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 3 medium size units (91 lines of code)
    • 4 small units (54 lines of code)
    • 49 very small units (225 lines of code)
0% | 0% | 24% | 14% | 60%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 0% | 24% | 14% | 60%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
example_app/graviton2_gh_runner_flask_app0% | 0% | 100% | 0% | 0%
example_app0% | 0% | 45% | 50% | 3%
cdk_graviton2_gh_sh_runner0% | 0% | 74% | 0% | 25%
example_app/graviton2_gh_runner_flask_app/resources0% | 0% | 0% | 14% | 85%
example_app/graviton2_gh_runner_flask_app/dynamodb0% | 0% | 0% | 60% | 40%
example_app/graviton2_gh_runner_flask_app/models0% | 0% | 0% | 0% | 100%
example_app/graviton2_gh_runner_flask_app/controllers0% | 0% | 0% | 0% | 100%
example_app/graviton2_gh_runner_flask_app/helpers0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def create_app()
in example_app/graviton2_gh_runner_flask_app/__init__.py
39 2 1
def __init__()
in cdk_graviton2_gh_sh_runner/ec2_stack.py
26 3 5
def load_order_data()
in example_app/load_local_data.py
26 3 3
def load_book_data()
in example_app/load_local_data.py
17 2 2
def post()
in example_app/graviton2_gh_runner_flask_app/resources/books.py
13 3 1
def __init__()
in example_app/graviton2_gh_runner_flask_app/dynamodb/context_manager.py
12 2 2
def create_cart_data()
in example_app/load_local_data.py
12 3 3
def __init__()
in cdk_graviton2_gh_sh_runner/vpc_stack.py
9 1 5
def record()
in example_app/graviton2_gh_runner_flask_app/models/books_model.py
9 1 1
def convert_decimal()
in example_app/graviton2_gh_runner_flask_app/helpers/helpers.py
8 8 1
def record()
in example_app/graviton2_gh_runner_flask_app/models/orders_model.py
8 2 1
def get()
in example_app/graviton2_gh_runner_flask_app/resources/books.py
8 2 1
def get()
in example_app/graviton2_gh_runner_flask_app/resources/books.py
8 2 2
def get()
in example_app/graviton2_gh_runner_flask_app/resources/orders.py
8 2 2
def get()
in example_app/graviton2_gh_runner_flask_app/resources/orders.py
8 2 3
def get()
in example_app/graviton2_gh_runner_flask_app/resources/cart.py
8 2 2
def get()
in example_app/graviton2_gh_runner_flask_app/resources/cart.py
8 2 2
def default()
in example_app/graviton2_gh_runner_flask_app/models/helpers.py
7 3 2
def record()
in example_app/graviton2_gh_runner_flask_app/models/cart_model.py
7 1 1
def record()
in example_app/graviton2_gh_runner_flask_app/models/cart_model.py
7 1 1