awslabs / amplify-video
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 237 units with 4,310 lines of code in units (64.9% of code).
    • 3 very long units (511 lines of code)
    • 10 long units (635 lines of code)
    • 53 medium size units (1,570 lines of code)
    • 57 small units (854 lines of code)
    • 114 very small units (740 lines of code)
11% | 14% | 36% | 19% | 17%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js11% | 14% | 36% | 19% | 17%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
provider-utils/awscloudformation/service-walkthroughs41% | 12% | 16% | 4% | 25%
provider-utils/awscloudformation/cloudformation-templates5% | 10% | 37% | 28% | 17%
provider-utils/awscloudformation/utils0% | 25% | 40% | 22% | 12%
commands0% | 100% | 0% | 0% | 0%
commands/video0% | 0% | 90% | 7% | 2%
ROOT0% | 0% | 47% | 24% | 28%
provider-utils/awscloudformation0% | 0% | 46% | 31% | 22%
scripts0% | 0% | 0% | 100% | 0%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
async function serviceQuestions()
in provider-utils/awscloudformation/service-walkthroughs/vod-push.js
210 19 4
async function serviceQuestions()
in provider-utils/awscloudformation/service-walkthroughs/livestream-push.js
196 9 4
async update()
in provider-utils/awscloudformation/cloudformation-templates/livestream-helpers/LambdaFunctions/psdemo-js-live-workflow_v0.4.0/lib/babelfish.js
105 20 0
function handleEJS()
in provider-utils/awscloudformation/utils/video-staging.js
85 2 4
addMediaStoreOutputGroup()
in provider-utils/awscloudformation/cloudformation-templates/livestream-helpers/LambdaFunctions/psdemo-js-live-workflow_v0.4.0/lib/flagfish.js
73 7 1
function getVODEnvVars()
in provider-utils/awscloudformation/utils/video-staging.js
65 10 3
async function createCMS()
in provider-utils/awscloudformation/service-walkthroughs/vod-push.js
63 10 3
async function setupWebProjects()
in provider-utils/awscloudformation/utils/video-player.js
63 10 2
async function generateAWSExportsVideo()
in provider-utils/awscloudformation/utils/video-getinfo.js
60 16 1
async function authGroupHack()
in provider-utils/awscloudformation/service-walkthroughs/vod-push.js
59 10 2
async send()
in provider-utils/awscloudformation/cloudformation-templates/livestream-helpers/LambdaFunctions/psdemo-js-live-workflow_v0.4.0/lib/cfResponse.js
57 5 2
run: async()
in commands/video.js
55 4 1
async createEndpoints()
in provider-utils/awscloudformation/cloudformation-templates/livestream-helpers/LambdaFunctions/psdemo-js-live-workflow_v0.4.0/lib/babelfish.js
55 11 0
async create()
in provider-utils/awscloudformation/cloudformation-templates/livestream-helpers/LambdaFunctions/psdemo-js-live-workflow_v0.4.0/lib/flagfish.js
49 4 0
async function copyFilesToS3()
in provider-utils/awscloudformation/utils/video-staging.js
45 7 5
async function serviceQuestions()
in provider-utils/awscloudformation/service-walkthroughs/ivs-push.js
44 3 4
async function setupIosProject()
in provider-utils/awscloudformation/utils/video-player.js
44 3 2
async function installIosDependencies()
in provider-utils/awscloudformation/utils/video-player-utils.js
41 4 2
initialize()
in provider-utils/awscloudformation/cloudformation-templates/livestream-helpers/LambdaFunctions/psdemo-js-live-workflow_v0.4.0/lib/flagfish.js
40 10 2
async function createCDN()
in provider-utils/awscloudformation/service-walkthroughs/vod-push.js
39 7 5