aws-solutions / cognito-user-profiles-export-reference-architecture
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 19 units with 275 lines of code in units (5.4% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (66 lines of code)
    • 1 medium size units (36 lines of code)
    • 8 small units (121 lines of code)
    • 9 very small units (52 lines of code)
0% | 24% | 13% | 44% | 18%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js0% | 24% | 13% | 44% | 18%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
source/workflow-export0% | 64% | 35% | 0% | 0%
source/custom-resources0% | 0% | 0% | 76% | 23%
source/workflow-import0% | 0% | 0% | 100% | 0%
source/workflow-common0% | 0% | 0% | 0% | 100%
source/utils0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 19 longest units
Unit# linesMcCabe index# params
async function batchWriteUsers()
in source/workflow-export/export-users.js
66 15 5
async function listCognitoUsers()
in source/workflow-export/export-users.js
36 11 2
async function sendResponse()
in source/custom-resources/stackset-manager.js
18 1 3
async function sendResponse()
in source/custom-resources/check-stackset-status.js
18 1 3
async function sendResponse()
in source/custom-resources/global-table-creator.js
18 1 3
async function sendResponse()
in source/custom-resources/global-table-checker.js
18 1 3
async function createGlobalTable()
in source/custom-resources/global-table-creator.js
16 3 1
await sendAnonymousMetric()
in source/workflow-import/import-users.js
11 1 10
await sendMessagesToQueue()
in source/workflow-import/scan-table.js
11 6 1
async function startStepFunction()
in source/custom-resources/global-table-creator.js
11 2 2
await sendMetric()
in source/workflow-common/message-broker.js
9 1 5
await sendAnonymousMetric()
in source/workflow-common/message-broker.js
9 1 8
await startStepFunction()
in source/custom-resources/global-table-creator.js
8 1 5
await sendResponse()
in source/custom-resources/global-table-checker.js
6 1 4
async function getSecondaryLastestStreamArn()
in source/custom-resources/global-table-checker.js
6 2 0
await sendResponse()
in source/custom-resources/global-table-checker.js
4 1 4
TimeStamp: moment()
in source/utils/metrics.js
4 1 0
StackSetName: getStackSetName()
in source/custom-resources/solution-constants.js
3 1 1
async function sleep()
in source/custom-resources/global-table-checker.js
3 1 1