awslabs / fhir-works-on-aws-interface
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 469 lines of code in units (18.3% of code).
    • 1 very long units (149 lines of code)
    • 1 long units (98 lines of code)
    • 1 medium size units (27 lines of code)
    • 0 small units (0 lines of code)
    • 47 very small units (195 lines of code)
31% | 20% | 5% | 0% | 41%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts31% | 20% | 5% | 0% | 41%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src37% | 24% | 6% | 0% | 30%
src/errors0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
149 1 1
98 19 2
log()
in src/loggerBuilder.ts
27 7 2
constructor()
in src/errors/ResourceVersionNotFoundError.ts
10 3 4
function cleanUrlPath()
in src/utilities.ts
10 3 1
function getExportType()
in src/utilities.ts
10 3 1
constructor()
in src/errors/ResourceNotFoundError.ts
9 2 3
constructor()
in src/errors/ResourceConflictError.ts
9 2 3
export function makeLogger()
in src/loggerBuilder.ts
7 1 2
export function chunkArray()
in src/utilities.ts
7 2 2
7 3 1
constructor()
in src/errors/InvalidSearchParameterError.ts
6 1 1
constructor()
in src/errors/UnauthorizedError.ts
6 1 1
constructor()
in src/errors/TooManyConcurrentExportRequestsError.ts
6 1 1
export function isTooManyConcurrentExportRequestsError()
in src/errors/TooManyConcurrentExportRequestsError.ts
6 2 1
constructor()
in src/errors/InvalidResourceError.ts
6 1 1
export function isResourceVersionNotFoundError()
in src/errors/ResourceVersionNotFoundError.ts
3 2 1
export function isResourceNotFoundError()
in src/errors/ResourceNotFoundError.ts
3 2 1
export function isInvalidSearchParameterError()
in src/errors/InvalidSearchParameterError.ts
3 2 1
export function isUnauthorizedError()
in src/errors/UnauthorizedError.ts
3 2 1