aws-solutions / multi-region-application-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 50 units with 807 lines of code in units (29.3% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 12 medium size units (350 lines of code)
    • 20 small units (339 lines of code)
    • 18 very small units (118 lines of code)
0% | 0% | 43% | 42% | 14%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts0% | 0% | 34% | 50% | 14%
js0% | 0% | 69% | 14% | 15%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
source/console/src0% | 0% | 69% | 14% | 15%
source/presentation-configurer/source0% | 0% | 60% | 29% | 10%
source/dynamodb-global-table-configurer/source0% | 0% | 48% | 38% | 13%
source/stackset-output-consolidator0% | 0% | 31% | 57% | 10%
source/stack-name-formatter0% | 0% | 33% | 44% | 22%
source/routing-configurer0% | 0% | 16% | 66% | 16%
source/uuid-generator0% | 0% | 26% | 58% | 14%
source/utils0% | 0% | 0% | 85% | 14%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
async componentDidMount()
in source/console/src/App.js
49 4 0
export async function handleCreate()
in source/presentation-configurer/source/index.ts
47 1 1
async componentDidMount()
in source/console/src/Routing.js
42 2 0
async function handleCreate()
in source/stackset-output-consolidator/index.ts
30 2 1
async function processEvent()
in source/stack-name-formatter/index.ts
26 7 1
async beginUploadImageWorkflow()
in source/console/src/App.js
24 6 0
async function handleCreate()
in source/dynamodb-global-table-configurer/source/index.ts
23 2 1
async function processEvent()
in source/presentation-configurer/source/index.ts
22 5 1
async function processEvent()
in source/uuid-generator/index.ts
22 5 1
async function processEvent()
in source/dynamodb-global-table-configurer/source/index.ts
22 5 1
async function processEvent()
in source/routing-configurer/state-updater.ts
22 5 1
static async getAppState()
in source/console/src/Common.js
21 13 0
function sendResponse()
in source/uuid-generator/index.ts
20 1 3
function sendResponse()
in source/dynamodb-global-table-configurer/source/index.ts
20 1 3
function sendResponse()
in source/routing-configurer/state-updater.ts
20 1 3
function sendResponse()
in source/stackset-output-consolidator/index.ts
20 1 3
function sendResponse()
in source/presentation-configurer/source/index.ts
19 1 3
function sendResponse()
in source/stack-name-formatter/index.ts
19 1 3
async function processEvent()
in source/stackset-output-consolidator/index.ts
19 4 1
async sendAnonymousMetric()
in source/utils/metrics.ts
18 3 1