aws-samples / aws-iot-greengrass-component-gluoncv-people-counter
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 9 units with 82 lines of code in units (44.8% 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)
    • 2 small units (30 lines of code)
    • 6 very small units (31 lines of code)
0% | 0% | 25% | 36% | 37%
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% | 25% | 36% | 37%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
count_people0% | 0% | 25% | 36% | 37%
Alternative Visuals
Longest Units
Top 9 longest units
Unit# linesMcCabe index# params
def connect()
in artifacts/count_people/IPCUtils.py
21 1 1
def capture_file()
in artifacts/count_people/infer.py
16 7 2
def get_output_file()
in artifacts/count_people/infer.py
14 2 0
def overlay_boxes()
in artifacts/count_people/infer.py
8 1 5
def make_message()
in artifacts/count_people/infer.py
7 1 4
def publish_to_iot_core()
in artifacts/count_people/infer.py
5 1 3
def get_object_boxes()
in artifacts/count_people/infer.py
5 1 6
def predict()
in artifacts/count_people/infer.py
4 1 2
def print_msg_to_stdout()
in artifacts/count_people/infer.py
2 1 3