awslabs / amazon-app-runner-deploy
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 13 units with 254 lines of code in units (66.8% of code).
    • 1 very long units (159 lines of code)
    • 0 long units (0 lines of code)
    • 1 medium size units (33 lines of code)
    • 1 small units (19 lines of code)
    • 10 very small units (43 lines of code)
62% | 0% | 12% | 7% | 16%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts62% | 0% | 12% | 7% | 16%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src79% | 0% | 0% | 9% | 11%
src/test-helpers0% | 0% | 61% | 0% | 38%
Alternative Visuals
Longest Units
Top 13 longest units
Unit# linesMcCabe index# params
159 29 0
export function getFakeCommandOutput()
in src/test-helpers/app-runner-commands.ts
33 13 3
19 5 2
function getInputInt()
in src/index.ts
8 3 2
export function getFakeInput()
in src/test-helpers/fake-input.ts
7 2 2
4 1 1
4 1 1
static isUpdateServiceCommand()
in src/test-helpers/app-runner-commands.ts
4 2 1
static isListServicesCommand()
in src/test-helpers/app-runner-commands.ts
4 2 1
function sleep()
in src/index.ts
3 1 1
3 2 1
static isCreateServiceCommand()
in src/test-helpers/app-runner-commands.ts
3 1 1
static isDescribeServiceCommand()
in src/test-helpers/app-runner-commands.ts
3 2 1