aws-deepracer / aws-deepracer-device-info-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 18 units with 179 lines of code in units (78.2% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 2 medium size units (52 lines of code)
    • 4 small units (57 lines of code)
    • 12 very small units (70 lines of code)
0% | 0% | 29% | 31% | 39%
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% | 29% | 31% | 39%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
device_info_pkg/device_info_pkg0% | 0% | 30% | 33% | 35%
device_info_pkg/launch0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 18 longest units
Unit# linesMcCabe index# params
def load_hardware_version()
in device_info_pkg/device_info_pkg/device_info_node.py
31 10 1
def enable()
in device_info_pkg/device_info_pkg/gpio_module.py
21 5 1
def load_sb()
in device_info_pkg/device_info_pkg/device_info_node.py
18 4 1
def __init__()
in device_info_pkg/device_info_pkg/device_info_node.py
14 3 1
def get_device_info()
in device_info_pkg/device_info_pkg/device_info_node.py
13 4 3
def load_software_version()
in device_info_pkg/device_info_pkg/device_info_node.py
12 3 1
def disable()
in device_info_pkg/device_info_pkg/gpio_module.py
9 2 1
def generate_launch_description()
in device_info_pkg/launch/device_info_pkg_launch.py
9 1 0
def get()
in device_info_pkg/device_info_pkg/gpio_module.py
8 2 1
def __init__()
in device_info_pkg/device_info_pkg/gpio_module.py
7 1 5
def set()
in device_info_pkg/device_info_pkg/gpio_module.py
7 2 2
def get_hardware_version()
in device_info_pkg/device_info_pkg/device_info_node.py
6 2 1
def get_software_version()
in device_info_pkg/device_info_pkg/device_info_node.py
6 2 1
def main()
in device_info_pkg/device_info_pkg/device_info_node.py
6 1 1
def get_secure_boot_info()
in device_info_pkg/device_info_pkg/device_info_node.py
5 2 1
def timer_callback()
in device_info_pkg/device_info_pkg/device_info_node.py
3 1 1
def on()
in device_info_pkg/device_info_pkg/gpio_module.py
2 1 1
def off()
in device_info_pkg/device_info_pkg/gpio_module.py
2 1 1