aws-solutions / aws-data-lake-solution
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 1,085 units with 14,262 lines of code in units (69.4% of code).
    • 3 very long units (829 lines of code)
    • 22 long units (1,484 lines of code)
    • 158 medium size units (4,850 lines of code)
    • 270 small units (3,948 lines of code)
    • 632 very small units (3,151 lines of code)
5% | 10% | 34% | 27% | 22%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js5% | 10% | 34% | 27% | 22%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
source/api/services/admin21% | 8% | 39% | 17% | 12%
source/api/services/package11% | 17% | 44% | 11% | 14%
source/console/app/lib5% | 3% | 20% | 29% | 39%
source/api/services/cart0% | 59% | 16% | 11% | 11%
source/resources/helper/lib0% | 27% | 50% | 13% | 8%
source/api/services/search0% | 37% | 39% | 5% | 16%
source/console/app/package0% | 22% | 30% | 21% | 25%
source/console/app/common0% | 0% | 25% | 59% | 14%
source/api/authorizer0% | 0% | 70% | 16% | 12%
source/api/services/manifest0% | 0% | 43% | 36% | 20%
source/api/services/profile0% | 0% | 69% | 13% | 17%
source/console/app/admin0% | 0% | 27% | 47% | 25%
source/resources/access-validator0% | 0% | 69% | 8% | 21%
source/console/app/search0% | 0% | 39% | 25% | 35%
source/api/services/logging0% | 0% | 34% | 33% | 31%
source/cli/core0% | 0% | 80% | 19% | 0%
source/resources/loader/core0% | 0% | 80% | 19% | 0%
source/console/app/cart0% | 0% | 65% | 21% | 13%
source/resources/helper0% | 0% | 17% | 57% | 25%
source/console/app/signin0% | 0% | 100% | 0% | 0%
source/console/app/dashboard0% | 0% | 61% | 0% | 38%
source/console/app/profile0% | 0% | 0% | 55% | 45%
source/console/app/forgot0% | 0% | 0% | 100% | 0%
deployment/manifest-generator0% | 0% | 0% | 100% | 0%
source/resources/loader0% | 0% | 0% | 47% | 52%
source/console/app/confirm0% | 0% | 0% | 100% | 0%
source/console/app/main0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
function processRequest()
in source/api/services/admin/lib/index.js
427 85 3
function processRequest()
in source/api/services/package/lib/index.js
206 48 3
function build()
in source/console/app/lib/aws-ui/AWS-UI-Components/components.js
196 120 11
cognitoHelper.prototype.createDataLakeUserPool = function()
in source/resources/helper/lib/cognito-helper.js
91 4 1
function processRequest()
in source/api/services/cart/lib/index.js
89 17 3
var getPackageDetails = function()
in source/console/app/package/package.js
87 12 1
cart.prototype.checkout = function()
in source/api/services/cart/lib/cart.js
80 7 4
cart.prototype.createCartItem = function()
in source/api/services/cart/lib/cart.js
73 7 3
(function(root, factory)()
in source/console/app/lib/aws-ui/AWS-UI-Components/components.js
73 13 2
metadata.prototype.indexColumns = function()
in source/api/services/search/lib/metadata.js
71 10 2
getConfigInfo()
in source/api/services/search/lib/metadata.js
70 5 2
getManifestImportedDatasetsList()
in source/api/services/package/lib/content-package.js
67 15 4
getUserPoolConfigInfo()
in source/api/services/admin/lib/user.js
65 11 2
function processRequest()
in source/api/services/search/lib/index.js
65 11 3
getLatestMetadataEntry()
in source/api/services/package/lib/metadata.js
65 9 3
$scope.createPackage = function()
in source/console/app/package/package.js
65 14 2
let getCartItemDetails = function()
in source/api/services/cart/lib/cart.js
64 13 4
cognitoHelper.prototype.createAdminUser = function()
in source/resources/helper/lib/cognito-helper.js
62 3 5
Select.prototype.bindKeys = function()
in source/console/app/lib/aws-ui/AWS-UI-Components/components.js
61 17 0
dataset.prototype.processPackageDatasetManifest = function()
in source/api/services/package/lib/dataset.js
59 8 5