aws-solutions / aws-virtual-waiting-room
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 78 units with 1,320 lines of code in units (31.1% of code).
    • 2 very long units (256 lines of code)
    • 2 long units (151 lines of code)
    • 17 medium size units (523 lines of code)
    • 14 small units (194 lines of code)
    • 43 very small units (196 lines of code)
19% | 11% | 39% | 14% | 14%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py20% | 11% | 41% | 14% | 12%
js0% | 0% | 0% | 25% | 75%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
source/core-api32% | 19% | 34% | 9% | 3%
source/openid-waitingroom0% | 0% | 67% | 6% | 26%
source/sample-inlet-strategies0% | 0% | 85% | 14% | 0%
source/token-authorizer0% | 0% | 28% | 45% | 25%
source/shared0% | 0% | 26% | 30% | 43%
source/sample-waiting-room-site0% | 0% | 0% | 25% | 75%
source/tools0% | 0% | 0% | 57% | 42%
deployment0% | 0% | 0% | 100% | 0%
source/core-api-authorizers-sample0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def lambda_handler()
in source/core-api/lambda_functions/auth_generate_token.py
130 15 2
def lambda_handler()
in source/core-api/lambda_functions/generate_token.py
126 14 2
def lambda_handler()
in source/core-api/lambda_functions/reset_initial_state.py
91 5 2
def lambda_handler()
in source/core-api/lambda_functions/update_session.py
60 9 2
def token()
in source/openid-waitingroom/chalice/app.py
42 8 0
def lambda_handler()
in source/core-api/lambda_functions/get_num_active_tokens.py
40 4 2
def lambda_handler()
in source/sample-inlet-strategies/max_size_inlet.py
39 18 2
def userinfo()
in source/openid-waitingroom/chalice/app.py
39 6 0
def lambda_handler()
in source/sample-inlet-strategies/periodic_inlet.py
38 12 2
def lambda_handler()
in source/core-api/lambda_functions/get_list_expired_tokens.py
38 6 2
def lambda_handler()
in source/core-api/lambda_functions/generate_events.py
38 2 2
def lambda_handler()
in source/core-api/lambda_functions/assign_queue_num.py
32 10 2
def lambda_handler()
in source/core-api/lambda_functions/get_queue_num.py
31 4 2
def authorize()
in source/openid-waitingroom/chalice/app.py
27 3 0
def create()
in source/core-api/custom_resources/generate_keys.py
25 5 2
def openid_configuration()
in source/openid-waitingroom/chalice/app.py
24 1 0
def lambda_handler()
in source/core-api/lambda_functions/get_waiting_num.py
23 2 2
def lambda_handler()
in source/core-api/lambda_functions/increment_serving_counter.py
23 2 2
def lambda_handler()
in source/core-api/lambda_functions/get_serving_num.py
22 2 2
def check_authorizer_token()
in source/token-authorizer/chalice/app.py
21 2 2