aws-samples / aws-dev-fabric-for-sql-server
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 195 lines of code in units (11.8% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (85 lines of code)
    • 3 medium size units (78 lines of code)
    • 1 small units (11 lines of code)
    • 3 very small units (21 lines of code)
0% | 43% | 40% | 5% | 10%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 43% | 40% | 5% | 10%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
control-plane/custom-resources/src_custom_resources0% | 60% | 37% | 0% | 2%
control-plane/custom-resources/src_macro0% | 0% | 46% | 20% | 33%
Alternative Visuals
Longest Units
Top 8 longest units
Unit# linesMcCabe index# params
def handler()
in control-plane/custom-resources/src_custom_resources/subnets_checker.py
85 14 2
def handler()
in control-plane/custom-resources/src_custom_resources/unique_id.py
28 3 2
def send()
in control-plane/custom-resources/src_custom_resources/cfnresponse.py
25 4 7
def process_template()
in control-plane/custom-resources/src_macro/index.py
25 6 2
def update_placeholder()
in control-plane/custom-resources/src_macro/index.py
11 5 2
def multiply()
in control-plane/custom-resources/src_macro/index.py
10 2 3
def handler()
in control-plane/custom-resources/src_macro/index.py
8 1 2
def error_and_exit()
in control-plane/custom-resources/src_custom_resources/subnets_checker.py
3 1 1