awslabs / aws-greengrass-labs-local-web-server
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 202 lines of code in units (52.1% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 2 medium size units (60 lines of code)
    • 5 small units (61 lines of code)
    • 15 very small units (81 lines of code)
0% | 0% | 29% | 30% | 40%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js0% | 0% | 48% | 11% | 40%
py0% | 0% | 0% | 61% | 38%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/frontend/src0% | 0% | 48% | 11% | 40%
src/backend0% | 0% | 0% | 61% | 38%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
render()
in src/frontend/src/App.js
39 3 0
start_socket()
in src/frontend/src/App.js
21 2 0
constructor()
in src/frontend/src/App.js
14 1 1
def handle_message()
in src/backend/app.py
13 2 1
def get_secret()
in src/backend/app.py
12 1 0
def login()
in src/backend/app.py
11 4 0
def subscribe_to_core()
in src/backend/app.py
11 1 1
login()
in src/frontend/src/App.js
10 1 0
check_authentication()
in src/frontend/src/App.js
10 2 0
handleInputChange()
in src/frontend/src/App.js
8 1 1
def connect_handler()
in src/backend/app.py
8 2 0
logout()
in src/frontend/src/App.js
7 1 0
def user_loader()
in src/backend/app.py
6 2 1
close_socket()
in src/frontend/src/App.js
5 1 0
handleSubmit()
in src/frontend/src/App.js
4 1 1
publishMessage()
in src/frontend/src/App.js
4 1 0
def get_user()
in src/backend/app.py
4 3 1
def on_stream_event()
in src/backend/app.py
4 1 2
componentDidMount()
in src/frontend/src/App.js
3 1 0
def logout()
in src/backend/app.py
3 1 0