aws-samples / aws-data-lake-solution-cn
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,228 units with 16,121 lines of code in units (63.0% of code).
    • 3 very long units (829 lines of code)
    • 28 long units (1,808 lines of code)
    • 183 medium size units (5,467 lines of code)
    • 311 small units (4,521 lines of code)
    • 703 very small units (3,496 lines of code)
5% | 11% | 33% | 28% | 21%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js5% | 11% | 33% | 28% | 21%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
source/api/services11% | 17% | 40% | 15% | 15%
source/console/app2% | 6% | 28% | 36% | 26%
source/resources/helper0% | 21% | 43% | 23% | 12%
source/resources/access-validator0% | 0% | 63% | 10% | 26%
source/resources/loader0% | 0% | 44% | 31% | 23%
source/cli/core0% | 0% | 80% | 19% | 0%
deployment/manifest-generator0% | 0% | 0% | 100% | 0%
source/api/authorizer0% | 0% | 0% | 42% | 57%
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