aws-samples / amazon-chime-sma-call-forwarding
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 35 units with 663 lines of code in units (62.1% of code).
    • 1 very long units (212 lines of code)
    • 0 long units (0 lines of code)
    • 6 medium size units (171 lines of code)
    • 13 small units (178 lines of code)
    • 15 very small units (102 lines of code)
31% | 0% | 25% | 26% | 15%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts100% | 0% | 0% | 0% | 0%
py0% | 0% | 37% | 39% | 22%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lib100% | 0% | 0% | 0% | 0%
src/handlerLambda0% | 0% | 57% | 32% | 10%
src/createChimeVCResources0% | 0% | 40% | 27% | 32%
src/createChimeSMAResources0% | 0% | 37% | 28% | 34%
src/smaLambda0% | 0% | 20% | 55% | 23%
utils0% | 0% | 0% | 100% | 0%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
constructor()
in lib/call-forwarding-with-sma-stack.ts
212 1 3
def get_phone_number()
in src/createChimeVCResources/createChimeVCResources.py
34 4 0
def get_phone_number()
in src/createChimeSMAResources/createChimeSMAResources.py
32 4 0
def lambda_handler()
in src/handlerLambda/callForwardHandler.py
31 6 2
def lambda_handler()
in src/smaLambda/callForwardingSMA.py
28 9 2
def assign_number_to_SMA()
in src/handlerLambda/callForwardHandler.py
24 3 1
def assign_number_to_VC()
in src/handlerLambda/callForwardHandler.py
22 5 2
def call_and_bridge_to_pstn_with_greeting()
in src/smaLambda/callForwardingSMA.py
20 1 3
def ddb_add_forward()
in src/handlerLambda/callForwardHandler.py
18 3 2
def ddb_remove_forward()
in src/handlerLambda/callForwardHandler.py
15 3 1
def ddb_get_destination()
in src/smaLambda/callForwardingSMA.py
15 3 1
def call_and_bridge_to_pstn()
in src/smaLambda/callForwardingSMA.py
15 1 2
def create_sip_rule()
in src/createChimeSMAResources/createChimeSMAResources.py
13 1 4
def create_polly()
in utils/createWav.py
13 2 2
def new_call_handler()
in src/smaLambda/callForwardingSMA.py
12 4 2
def play_audio()
in src/smaLambda/callForwardingSMA.py
12 1 2
def associate_phone_number()
in src/createChimeVCResources/createChimeVCResources.py
12 1 2
def enable_forward()
in src/handlerLambda/callForwardHandler.py
11 4 2
def on_create()
in src/createChimeSMAResources/createChimeSMAResources.py
11 1 1
def create_voice_connector()
in src/createChimeVCResources/createChimeVCResources.py
11 1 1