awslabs / fhir-works-on-aws-deployment
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 44 units with 535 lines of code in units (11.7% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (57 lines of code)
    • 5 medium size units (130 lines of code)
    • 18 small units (257 lines of code)
    • 20 very small units (91 lines of code)
0% | 10% | 24% | 48% | 17%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
java0% | 40% | 0% | 47% | 12%
ts0% | 0% | 41% | 47% | 11%
py0% | 0% | 0% | 43% | 56%
js0% | 0% | 0% | 75% | 25%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
javaHapiValidatorLambda/src0% | 40% | 0% | 47% | 12%
auditLogMover0% | 0% | 67% | 32% | 0%
src/implementationGuides0% | 0% | 19% | 64% | 16%
scripts0% | 0% | 54% | 31% | 13%
bulkExport/glueScripts0% | 0% | 0% | 43% | 56%
bulkExport0% | 0% | 0% | 100% | 0%
src0% | 0% | 0% | 63% | 36%
updateSearchMappings0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
private PrePopulatedValidationSupport loadIgs()
in javaHapiValidatorLambda/src/main/java/software/amazon/fwoa/Validator.java
57 13 1
static async getAllLogStreams()
in auditLogMover/auditLogMoverHelper.ts
28 6 1
private static async getMetricDataPromise()
in auditLogMover/auditLogMoverHelper.ts
28 2 4
private async extractIgInfo()
in src/implementationGuides/IGCompiler.ts
25 4 1
private static async getDirectoriesInS3GivenPrefixes()
in auditLogMover/auditLogMoverHelper.ts
25 3 2
async function compileIGs()
in scripts/compile-igs.ts
24 5 0
private async collectResources()
in src/implementationGuides/IGCompiler.ts
19 4 2
public async compileIGs()
in src/implementationGuides/IGCompiler.ts
19 3 2
function extractPatientCompartmentSearchParams()
in bulkExport/extractPatientCompartmentSearchParams.js
18 2 2
private depthFirst()
in src/implementationGuides/IGCompiler.ts
17 5 2
public Validator()
in javaHapiValidatorLambda/src/main/java/software/amazon/fwoa/Validator.java
17 4 2
private async collectIGInfos()
in src/implementationGuides/IGCompiler.ts
15 3 1
static async putCWMetric()
in auditLogMover/auditLogMoverHelper.ts
15 3 3
public ValidatorResponse validate()
in javaHapiValidatorLambda/src/main/java/software/amazon/fwoa/Validator.java
14 2 1
function parseCmdOptions()
in scripts/compile-igs.ts
14 1 0
async function listIgDirs()
in src/implementationGuides/IGCompiler.ts
13 3 1
private void addToMap()
in javaHapiValidatorLambda/src/main/java/software/amazon/fwoa/Validator.java
13 4 3
def deep_get()
in bulkExport/glueScripts/export-script.py
13 6 2
12 1 1
private ValidatorResponse toValidatorResponse()
in javaHapiValidatorLambda/src/main/java/software/amazon/fwoa/Validator.java
12 1 1