aws-samples / aws-service-catalog-auto-import
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 8 units with 166 lines of code in units (43.7% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 5 medium size units (141 lines of code)
    • 1 small units (12 lines of code)
    • 2 very small units (13 lines of code)
0% | 0% | 84% | 7% | 7%
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% | 84% | 7% | 7%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
resources0% | 0% | 84% | 7% | 7%
Alternative Visuals
Longest Units
Top 8 longest units
Unit# linesMcCabe index# params
def setup_portfolios()
in resources/sc-autopilot-importer.py
40 8 3
def copy_products_to_local_account()
in resources/sc-autopilot-importer.py
28 4 4
def main()
in resources/sc-autopilot-importer.py
28 10 2
def create_constraint()
in resources/sc-autopilot-importer.py
23 8 4
def associate_products_to_local_portfolio()
in resources/sc-autopilot-importer.py
22 4 4
def associate_iam_principal()
in resources/sc-autopilot-importer.py
12 2 3
def accept_portfolio()
in resources/sc-autopilot-importer.py
8 2 1
def process_event()
in resources/sc-autopilot-importer.py
5 1 1