aws-samples / aws-marketplace-metered-container-product
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 36 units with 296 lines of code in units (42.7% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 3 medium size units (73 lines of code)
    • 9 small units (130 lines of code)
    • 24 very small units (93 lines of code)
0% | 0% | 24% | 43% | 31%
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% | 43% | 31%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
app0% | 0% | 24% | 43% | 31%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def __init__()
in app/marketplace.py
27 2 6
def _meter_usage()
in app/marketplace.py
25 6 3
def _create_dimensions_table()
in app/marketplace.py
21 2 1
def get()
in app/api.py
19 3 1
def _json_serial()
in app/marketplace.py
19 5 1
def _init_dimensions_table()
in app/marketplace.py
17 5 2
def meter_usages()
in app/marketplace.py
15 7 2
def __init__()
in app/marketplace.py
13 1 5
def run()
in app/marketplace.py
12 4 1
def __init__()
in app/marketplace.py
12 2 5
def update_type()
in app/marketplace.py
12 4 2
def add_dimension_quantity()
in app/marketplace.py
11 1 3
def get_dimensions()
in app/marketplace.py
8 2 1
def _update_dimension()
in app/marketplace.py
8 1 2
def __init__()
in app/marketplace.py
7 2 4
def get_status()
in app/marketplace.py
6 1 1
def _get_dimensions_name()
in app/marketplace.py
6 2 1
def discard_dimension_errors()
in app/marketplace.py
6 4 2
def get()
in app/api.py
5 1 1
def get_consumption()
in app/marketplace.py
5 1 1