aws-deepracer / aws-deepracer-status-led-pkg
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 29 units with 223 lines of code in units (73.6% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 1 medium size units (21 lines of code)
    • 6 small units (86 lines of code)
    • 22 very small units (116 lines of code)
0% | 0% | 9% | 38% | 52%
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% | 9% | 38% | 52%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
status_led_pkg/status_led_pkg0% | 0% | 9% | 40% | 50%
status_led_pkg/launch0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def enable()
in status_led_pkg/status_led_pkg/gpio_module.py
21 5 1
def __init__()
in status_led_pkg/status_led_pkg/status_led_node.py
20 6 1
def effect_two_color_siren()
in status_led_pkg/status_led_pkg/status_led_node.py
16 4 5
def set_led_blink_callback()
in status_led_pkg/status_led_pkg/status_led_node.py
13 2 3
def effect_solid_color()
in status_led_pkg/status_led_pkg/status_led_node.py
13 2 4
def set_led_solid_callback()
in status_led_pkg/status_led_pkg/status_led_node.py
12 2 3
def effect_loop()
in status_led_pkg/status_led_pkg/status_led_node.py
12 4 1
def __init__()
in status_led_pkg/status_led_pkg/led_control.py
10 2 3
def generate_launch_description()
in status_led_pkg/launch/status_led_pkg_launch.py
9 1 0
def disable()
in status_led_pkg/status_led_pkg/gpio_module.py
9 2 1
def get_led()
in status_led_pkg/status_led_pkg/status_led_node.py
8 2 2
def get()
in status_led_pkg/status_led_pkg/gpio_module.py
8 2 1
def __init__()
in status_led_pkg/status_led_pkg/gpio_module.py
7 1 5
def set()
in status_led_pkg/status_led_pkg/gpio_module.py
7 2 2
def __exit__()
in status_led_pkg/status_led_pkg/status_led_node.py
6 3 4
def main()
in status_led_pkg/status_led_pkg/status_led_node.py
6 1 1
def stop_effect()
in status_led_pkg/status_led_pkg/status_led_node.py
5 2 2
def start()
in status_led_pkg/status_led_pkg/status_led_node.py
5 3 3
def enable()
in status_led_pkg/status_led_pkg/led_control.py
4 1 1
def disable()
in status_led_pkg/status_led_pkg/led_control.py
4 1 1