aws-cloudformation / cloudformation-cli-python-plugin
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 98 units with 599 lines of code in units (40.4% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (58 lines of code)
    • 3 medium size units (81 lines of code)
    • 8 small units (109 lines of code)
    • 86 very small units (351 lines of code)
0% | 9% | 13% | 18% | 58%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 9% | 13% | 18% | 58%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
python/rpdk/python0% | 25% | 22% | 28% | 24%
src/cloudformation_cli_python_lib0% | 0% | 8% | 13% | 78%
python/rpdk/python/templates0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def init()
in python/rpdk/python/codegen.py
58 3 2
def _docker_build()
in python/rpdk/python/codegen.py
32 6 2
def _field_to_type()
in src/cloudformation_cli_python_lib/recast.py
28 7 4
def generate()
in python/rpdk/python/codegen.py
21 2 2
def _put_log_event()
in src/cloudformation_cli_python_lib/log_delivery.py
20 3 2
def translate_type()
in python/rpdk/python/resolver.py
16 7 1
def _serialize()
in src/cloudformation_cli_python_lib/interface.py
13 8 1
def _make_pip_command()
in python/rpdk/python/codegen.py
13 1 1
def __init__()
in python/rpdk/python/codegen.py
12 1 1
def package()
in python/rpdk/python/codegen.py
12 1 3
def _pip_build()
in python/rpdk/python/codegen.py
12 2 2
def cast_sequence_item()
in src/cloudformation_cli_python_lib/recast.py
11 5 5
def _recast_primitive()
in src/cloudformation_cli_python_lib/recast.py
10 6 3
def _init_settings()
in python/rpdk/python/codegen.py
10 2 2
def wrapper()
in src/cloudformation_cli_python_lib/resource.py
9 2 4
def deserialize()
in src/cloudformation_cli_python_lib/utils.py
9 4 3
def emit()
in src/cloudformation_cli_python_lib/log_delivery.py
8 3 2
def _recast_lists()
in src/cloudformation_cli_python_lib/recast.py
8 6 5
def get_partition()
in src/cloudformation_cli_python_lib/utils.py
8 4 1
def publish_metric()
in src/cloudformation_cli_python_lib/metrics.py
7 1 0