awslabs / aws-cfn-template-flip
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 43 units with 362 lines of code in units (72.7% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (52 lines of code)
    • 2 medium size units (50 lines of code)
    • 3 small units (50 lines of code)
    • 37 very small units (210 lines of code)
0% | 14% | 13% | 13% | 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% | 14% | 13% | 13% | 58%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
cfn_clean0% | 55% | 0% | 20% | 24%
cfn_flip0% | 0% | 43% | 0% | 56%
cfn_tools0% | 0% | 0% | 20% | 79%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def convert_join()
in cfn_clean/__init__.py
52 18 1
def main()
in cfn_flip/main.py
28 9 2
def flip()
in cfn_flip/__init__.py
22 19 6
def cfn_literal_parser()
in cfn_clean/__init__.py
19 14 1
def multi_constructor()
in cfn_tools/yaml_loader.py
17 6 3
def apply_configs()
in cfn_tools/_config.py
14 7 1
def _load_config()
in cfn_tools/_config.py
10 3 3
def _apply_type()
in cfn_tools/_config.py
10 4 4
def clean()
in cfn_clean/__init__.py
10 6 1
def load()
in cfn_flip/__init__.py
10 3 1
def __setattr__()
in cfn_tools/_config.py
9 2 3
def has_intrinsic_functions()
in cfn_clean/__init__.py
9 4 1
def fn_representer()
in cfn_flip/yaml_dumper.py
9 5 3
def map_representer()
in cfn_flip/yaml_dumper.py
9 4 2
def reset()
in cfn_tools/_config.py
8 3 2
def __init__()
in cfn_tools/odict.py
8 2 2
def dump_yaml()
in cfn_flip/__init__.py
8 1 3
def string_representer()
in cfn_flip/yaml_dumper.py
8 7 2
def get_dumper()
in cfn_flip/yaml_dumper.py
8 4 2
def construct_getatt()
in cfn_tools/yaml_loader.py
7 4 1