aws-samples / aws-sso-extensions-for-enterprise
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 191 units with 2,178 lines of code in units (24.4% of code).
    • 2 very long units (338 lines of code)
    • 0 long units (0 lines of code)
    • 26 medium size units (608 lines of code)
    • 35 small units (556 lines of code)
    • 128 very small units (676 lines of code)
15% | 0% | 27% | 25% | 31%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts15% | 0% | 27% | 25% | 31%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lib/constructs23% | 0% | 32% | 22% | 20%
lib/lambda-functions/helpers0% | 0% | 54% | 21% | 23%
lib/stacks/pipelineStageStacks0% | 0% | 14% | 34% | 51%
lib/lambda-functions/application-handlers0% | 0% | 9% | 35% | 55%
lib/stacks/pipeline0% | 0% | 39% | 0% | 60%
lib/lambda-functions/user-interface-handlers0% | 0% | 0% | 100% | 0%
lib/lambda-functions/current-config-handlers0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
constructor()
in lib/constructs/fetch-cross-stack-values.ts
203 1 3
constructor()
in lib/constructs/import-artefacts.ts
135 1 3
constructor()
in lib/constructs/observability-artefacts.ts
47 1 3
export function serializeDurationToISOFormat()
in lib/lambda-functions/helpers/src/isoDurationUtility.ts
27 12 1
export function parseISODurationString()
in lib/lambda-functions/helpers/src/isoDurationUtility.ts
24 7 1
minutes: parseInt()
in lib/lambda-functions/application-handlers/src/permissionSetTopicProcessor.ts
24 3 1
functionName: name()
in lib/constructs/sso-group-processor.ts
24 1 2
functionName: name()
in lib/constructs/link-processor.ts
23 1 2
functionName: name()
in lib/constructs/permission-set-processor.ts
23 1 2
functionName: name()
in lib/constructs/permission-set-processor.ts
23 1 2
entry: join()
in lib/constructs/sso-group-processor.ts
23 1 6
functionName: name()
in lib/constructs/link-crud.ts
23 1 2
functionName: name()
in lib/constructs/permission-set-crud.ts
23 1 2
functionName: name()
in lib/constructs/permission-set-crud.ts
23 1 2
functionName: name()
in lib/stacks/pipelineStageStacks/sso-import-artefacts-part2.ts
23 1 2
functionName: name()
in lib/constructs/link-processor.ts
22 1 2
functionName: name()
in lib/constructs/org-events.ts
22 1 2
entry: join()
in lib/constructs/permission-set-processor.ts
22 1 6
functionName: name()
in lib/constructs/sso-group-processor.ts
22 1 2
pipelineName: fullname()
in lib/stacks/pipeline/aws-sso-extensions-for-enterprise.ts
22 1 2