awslabs / aws-gov-cloud-import
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 124 units with 2,209 lines of code in units (63.5% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (120 lines of code)
    • 37 medium size units (999 lines of code)
    • 60 small units (918 lines of code)
    • 25 very small units (172 lines of code)
0% | 5% | 45% | 41% | 7%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js0% | 5% | 45% | 41% | 7%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ec20% | 14% | 29% | 39% | 16%
lambda/ec2Run0% | 25% | 37% | 32% | 3%
browser/scripts0% | 0% | 45% | 42% | 11%
lambda/importImageStatus0% | 0% | 76% | 23% | 0%
lambda/makeVolume0% | 0% | 100% | 0% | 0%
lambda/appStatus0% | 0% | 68% | 31% | 0%
lambda/importImage0% | 0% | 68% | 31% | 0%
lambda/moveStatus0% | 0% | 57% | 42% | 0%
lambda/listGovBuckets0% | 0% | 44% | 55% | 0%
lambda/snsPublish0% | 0% | 32% | 67% | 0%
lambda/removeS3Image0% | 0% | 42% | 57% | 0%
lambda/initStepFunction0% | 0% | 53% | 46% | 0%
lambda/initS3Sync0% | 0% | 53% | 46% | 0%
browser0% | 0% | 0% | 100% | 0%
lambda/snsSubscribe0% | 0% | 0% | 100% | 0%
lambda/listComBuckets0% | 0% | 0% | 100% | 0%
lambda/cleanUp0% | 0% | 0% | 100% | 0%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
async function syncS3()
in ec2/gov-cloud-import.js
69 4 0
function runInst()
in lambda/ec2Run/index.js
51 3 0
async function refreshInstallStatusWest()
in browser/scripts/gov-cloud-import-browser.js
44 8 0
async function refreshInstallStatusEast()
in browser/scripts/gov-cloud-import-browser.js
44 8 0
function findLetter()
in ec2/gov-cloud-import.js
40 6 1
function registerImage()
in lambda/importImageStatus/index.js
36 3 1
function terminateInst()
in browser/scripts/gov-cloud-import-browser.js
33 4 1
function copyVolume()
in ec2/gov-cloud-import.js
33 3 1
function govCloudFormationStatus()
in lambda/appStatus/index.js
32 4 1
function importWindows()
in lambda/importImage/index.js
32 2 1
function snsPublish()
in lambda/importImageStatus/index.js
32 5 1
function importStatusWindows()
in lambda/importImageStatus/index.js
29 3 1
function initSNSSubscribe()
in browser/scripts/gov-cloud-import-browser.js
28 2 2
function comCloudFormationStatus()
in lambda/appStatus/index.js
28 4 0
function createKeyPair()
in lambda/ec2Run/index.js
28 3 0
function makeVolume()
in lambda/makeVolume/index.js
28 2 2
function importLinux()
in lambda/importImage/index.js
28 2 1
function importStatusLinux()
in lambda/importImageStatus/index.js
27 3 1
function watchComCloudFormation()
in browser/scripts/gov-cloud-import-browser.js
25 5 3
function watchGovCloudFormation()
in browser/scripts/gov-cloud-import-browser.js
25 5 3