awslabs / aws-video-transcriber
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 139 units with 2,964 lines of code in units (49.0% of code).
    • 1 very long units (142 lines of code)
    • 7 long units (468 lines of code)
    • 50 medium size units (1,524 lines of code)
    • 44 small units (647 lines of code)
    • 37 very small units (183 lines of code)
4% | 15% | 51% | 21% | 6%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js4% | 15% | 51% | 21% | 6%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lambda/burncaption40% | 18% | 28% | 7% | 4%
lambda/extractaudio0% | 54% | 38% | 0% | 6%
lambda/customresource0% | 34% | 30% | 34% | <1%
lambda/getcaption0% | 59% | 40% | 0% | 0%
lambda/updateburnedvideopath0% | 60% | 28% | 0% | 10%
web/js0% | 0% | 74% | 14% | 11%
lambda/transcribeaudio0% | 0% | 79% | 19% | 1%
lambda/createcaptions0% | 0% | 73% | 18% | 7%
lambda/batchcomplete0% | 0% | 66% | 31% | 1%
lambda/putcaption0% | 0% | 46% | 39% | 13%
lambda/translatecaptions0% | 0% | 41% | 46% | 11%
lambda/headvocabulary0% | 0% | 100% | 0% | 0%
lambda/putvocabulary0% | 0% | 100% | 0% | 0%
lambda/togglecomplete0% | 0% | 63% | 30% | 6%
lambda/updatevideostatus0% | 0% | 100% | 0% | 0%
lambda/updatevideolanguage0% | 0% | 75% | 0% | 24%
lambda/updatevideoname0% | 0% | 100% | 0% | 0%
lambda/updatevideodescription0% | 0% | 100% | 0% | 0%
lambda/putlanguage0% | 0% | 100% | 0% | 0%
lambda/deletevideo0% | 0% | 0% | 96% | 3%
lambda/reprocessvideo0% | 0% | 0% | 91% | 8%
lambda/getburnedvideo0% | 0% | 0% | 82% | 17%
lambda/getvideos0% | 0% | 0% | 82% | 17%
lambda/getvideo0% | 0% | 0% | 82% | 17%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
async function burnCaptions()
in source/lambda/burncaption/burncaption.js
142 3 4
async function extractAudio()
in source/lambda/extractaudio/extractaudio.js
92 2 1
async function deleteApiKey()
in source/lambda/customresource/customresource.js
75 8 1
async function createAPIKey()
in source/lambda/customresource/customresource.js
66 2 1
async function getMediaConvertEndpoint()
in source/lambda/extractaudio/extractaudio.js
65 4 0
async function getMediaConvertEndpoint()
in source/lambda/burncaption/burncaption.js
65 4 0
async function exportCaptions()
in source/lambda/getcaption/getcaption.js
54 13 3
async function updateDynamoDB()
in source/lambda/updateburnedvideopath/updateburnedvideopath.js
51 3 1
function computeRemainingParams()
in source/lambda/extractaudio/extractaudio.js
50 5 2
async function spliteCaptions()
in source/lambda/putcaption/putcaption.js
45 3 4
async function transcribeAudio()
in source/lambda/transcribeaudio/transcribeaudio.js
43 3 1
async function sendResponse()
in source/lambda/customresource/customresource.js
43 6 5
async function generateCaptions()
in source/lambda/batchcomplete/batchcomplete.js
43 2 6
async function computeParameters()
in source/lambda/transcribeaudio/transcribeaudio.js
41 2 1
function updateCaptions()
in source/web/js/app.js
40 1 7
function splitSentence()
in source/lambda/batchcomplete/batchcomplete.js
37 9 2
function splitSentence()
in source/lambda/getcaption/getcaption.js
37 9 2
function splitSentence()
in source/lambda/burncaption/burncaption.js
37 9 2
async function exportCaptions()
in source/lambda/batchcomplete/batchcomplete.js
36 7 3
async function exportCaptions()
in source/lambda/burncaption/burncaption.js
36 7 3