awslabs / aws-greengrass-group-setup
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 63 units with 1,090 lines of code in units (91.8% of code).
    • 0 very long units (0 lines of code)
    • 4 long units (272 lines of code)
    • 14 medium size units (457 lines of code)
    • 14 small units (202 lines of code)
    • 31 very small units (159 lines of code)
0% | 24% | 41% | 18% | 14%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 24% | 41% | 18% | 14%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
gg_group_setup0% | 25% | 42% | 18% | 14%
ROOT0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def create()
in gg_group_setup/cmd.py
75 6 6
def create_and_attach_iam_role()
in gg_group_setup/group.py
74 3 1
def _create_function_definition()
in gg_group_setup/cmd.py
67 8 4
def create_thing()
in gg_group_setup/cmd.py
56 6 5
def _delete_group()
in gg_group_setup/cmd.py
45 7 3
def create_and_attach_thing_policy()
in gg_group_setup/group.py
42 6 1
def update()
in gg_group_setup/group.py
41 18 2
def create_devices()
in gg_group_setup/cmd.py
38 8 9
def get_core_policy()
in gg_group_setup/cmd.py
36 2 4
def get_telemetry()
in gg_group_setup/mock_device.py
35 1 0
def create_core()
in gg_group_setup/cmd.py
33 4 8
def create_gg_config_file()
in gg_group_setup/cmd.py
32 1 5
def _delete_thing()
in gg_group_setup/cmd.py
30 3 6
def _create_device_definition()
in gg_group_setup/cmd.py
26 4 4
def _create_attach_thing_policy()
in gg_group_setup/cmd.py
26 6 4
def _create_logger_definition()
in gg_group_setup/cmd.py
25 1 3
24 2 3
def associate_devices()
in gg_group_setup/cmd.py
24 4 5
def _create_core_definition()
in gg_group_setup/cmd.py
20 3 4
def handler()
in gg_group_setup/mock_device.py
20 6 2