awslabs / auto-check-in-app
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 22 units with 386 lines of code in units (82.0% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (57 lines of code)
    • 6 medium size units (191 lines of code)
    • 7 small units (97 lines of code)
    • 8 very small units (41 lines of code)
0% | 14% | 49% | 25% | 10%
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% | 49% | 25% | 10%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
frontend0% | 22% | 27% | 39% | 10%
backend/create-collection-lambda0% | 0% | 100% | 0% | 0%
backend/rekognize-face-lambda0% | 0% | 75% | 0% | 24%
backend/index-face-lambda0% | 0% | 100% | 0% | 0%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def run()
in source/frontend/controller.py
57 15 1
def detect()
in source/frontend/detector.py
45 12 2
def lambda_handler()
in source/backend/rekognize-face-lambda/function.py
43 7 2
def lambda_handler()
in source/backend/index-face-lambda/function.py
35 4 2
def send()
in source/backend/create-collection-lambda/cfnresponse.py
25 3 6
def show_welcome()
in source/frontend/viewer.py
22 3 3
def lambda_handler()
in source/backend/create-collection-lambda/function.py
21 4 2
def main()
in source/frontend/main.py
19 3 0
def __init__()
in source/frontend/controller.py
17 2 3
def __init__()
in source/frontend/detector.py
15 3 2
def __init__()
in source/frontend/video_capture.py
13 3 3
def show_checking()
in source/frontend/viewer.py
11 1 2
def _get_id_token_by_cognito()
in source/frontend/controller.py
11 1 3
def read()
in source/frontend/video_capture.py
11 4 1
def __init__()
in source/frontend/viewer.py
9 4 2
def update_item()
in source/backend/rekognize-face-lambda/function.py
8 1 2
def _get_signature_key()
in source/frontend/controller.py
6 1 5
def generate_response()
in source/backend/rekognize-face-lambda/function.py
6 1 3
def _update_name_list()
in source/frontend/controller.py
5 3 1
def release()
in source/frontend/video_capture.py
3 2 1