aws-cloudformation / aws-cloudformation-macros
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 31 units with 536 lines of code in units (40.3% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 10 medium size units (303 lines of code)
    • 14 small units (195 lines of code)
    • 7 very small units (38 lines of code)
0% | 0% | 56% | 36% | 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% | 56% | 36% | 7%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
S3Objects0% | 0% | 88% | 11% | 0%
StackMetrics0% | 0% | 62% | 37% | 0%
Explode0% | 0% | 81% | 18% | 0%
ExecutionRoleBuilder0% | 0% | 68% | 19% | 12%
ShortHand0% | 0% | 32% | 47% | 19%
Boto30% | 0% | 28% | 71% | 0%
Count0% | 0% | 0% | 66% | 33%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def handler()
in S3Objects/lambda/resource.py
44 9 2
def handle_template()
in S3Objects/lambda/macro.py
39 11 2
def expand_role()
in ExecutionRoleBuilder/lambda/index.py
39 14 1
def log()
in StackMetrics/lambda/resource.py
29 2 3
def convert_template()
in ShortHand/lambda/convert.py
28 7 1
def walk_resource()
in Explode/lambda/explode.py
28 9 2
def handle_transform()
in Explode/lambda/explode.py
26 6 1
def send()
in StackMetrics/lambda/cfnresponse.py
25 3 6
def sendResponse()
in S3Objects/lambda/resource.py
23 1 4
def execute()
in Boto3/lambda/resource.py
22 6 2
def handler()
in StackMetrics/lambda/index.py
19 1 2
def process_template()
in Count/src/index.py
17 5 1
def parse_name()
in ShortHand/lambda/convert.py
16 6 1
def sendResponse()
in Boto3/lambda/resource.py
16 1 4
def handle_template()
in Boto3/lambda/macro.py
16 4 2
def handler()
in S3Objects/lambda/macro.py
14 2 2
def handler()
in StackMetrics/lambda/resource.py
14 3 2
def convert()
in ShortHand/lambda/convert.py
14 7 1
def handler()
in Explode/lambda/explode.py
12 1 2
def handler()
in Boto3/lambda/resource.py
12 5 2