awslabs / live-streaming-with-automated-multi-language-subtitling
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 43 units with 866 lines of code in units (86.4% of code).
    • 0 very long units (0 lines of code)
    • 6 long units (446 lines of code)
    • 4 medium size units (123 lines of code)
    • 12 small units (180 lines of code)
    • 21 very small units (117 lines of code)
0% | 51% | 14% | 20% | 13%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 59% | 13% | 16% | 10%
js0% | 0% | 19% | 45% | 35%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
customresources/custom-resource-py/lib0% | 63% | 13% | 21% | 1%
lambdafunctions/lambdaedge0% | 64% | 21% | 0% | 14%
customresources/custom-resource-py0% | 100% | 0% | 0% | 0%
transcribedocker0% | 0% | 18% | 43% | 38%
lambdafunctions/SNSTriggerAWSTranslateLambda0% | 0% | 0% | 60% | 40%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def lambda_handler()
in source/lambdafunctions/lambdaedge/lambda_function.py
88 16 2
def create_channel()
in source/customresources/custom-resource-py/lib/medialive.py
87 7 1
def create_endpoint()
in source/customresources/custom-resource-py/lib/mediapackage.py
82 6 1
def create_input()
in source/customresources/custom-resource-py/lib/medialive.py
79 7 1
def get_environment_variables()
in source/lambdafunctions/lambdaedge/lambda_function.py
58 18 1
def handler()
in source/customresources/custom-resource-py/lambda.py
52 16 2
def caption_latest()
in source/lambdafunctions/lambdaedge/lambda_function.py
48 11 2
def delete_channel()
in source/customresources/custom-resource-py/lib/medialive.py
29 7 1
function sendResultsToDynamo()
in source/transcribedocker/transcribe-to-dynamo-withSDK.js
23 2 2
def send()
in source/customresources/custom-resource-py/lib/cfnresponse.py
23 3 6
def create_channel()
in source/customresources/custom-resource-py/lib/mediapackage.py
20 3 1
def s3_deploy()
in source/customresources/custom-resource-py/lib/demo.py
19 2 1
def lambda_handler()
in source/lambdafunctions/SNSTriggerAWSTranslateLambda/lambda_function.py
18 6 2
id_session: String()
in source/transcribedocker/transcribe-to-dynamo-withSDK.js
17 2 1
def s3_delete()
in source/customresources/custom-resource-py/lib/demo.py
17 2 1
function publishSNSTopic()
in source/transcribedocker/transcribe-to-dynamo-withSDK.js
15 2 1
def send_metrics()
in source/customresources/custom-resource-py/lib/metrics.py
14 1 1
def put_dynamo()
in source/lambdafunctions/SNSTriggerAWSTranslateLambda/lambda_function.py
13 4 2
def delete_channel()
in source/customresources/custom-resource-py/lib/mediapackage.py
13 2 1
let handleEventStreamMessage = function()
in source/transcribedocker/transcribe-to-dynamo-withSDK.js
12 3 1