aws-solutions / aws-streaming-data-solution-for-amazon-kinesis-and-amazon-msk
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 121 units with 3,956 lines of code in units (81.9% of code).
    • 13 very long units (1,974 lines of code)
    • 10 long units (625 lines of code)
    • 25 medium size units (909 lines of code)
    • 11 small units (163 lines of code)
    • 62 very small units (285 lines of code)
49% | 15% | 22% | 4% | 7%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts52% | 17% | 22% | 3% | 4%
py32% | 0% | 25% | 11% | 31%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
source/patterns84% | 9% | 5% | 0% | 0%
source/labs100% | 0% | 0% | 0% | 0%
source/lib14% | 28% | 41% | 6% | 8%
source/lambda/msk-dashboard65% | 0% | 15% | 10% | 9%
source/lambda/cloud9-setup0% | 0% | 89% | 0% | 10%
source/lambda/solution-helper0% | 0% | 75% | 0% | 24%
source/lambda/kds-enhanced-monitoring0% | 0% | 0% | 59% | 40%
source/lambda/secrets-manager-metadata0% | 0% | 0% | 61% | 38%
source/lambda/kda-vpc-config0% | 0% | 0% | 0% | 100%
source/lambda/msk-metadata0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
constructor()
in source/patterns/kds-kda-apigw.ts
182 1 3
constructor()
in source/patterns/kds-kdf-s3.ts
180 1 3
constructor()
in source/patterns/apigw-kds-lambda.ts
173 1 3
constructor()
in source/labs/msk-client-setup.ts
173 3 3
constructor()
in source/labs/msk-cluster-setup.ts
168 1 3
private addFirehoseMetrics()
in source/lib/kdf-monitoring.ts
159 3 3
constructor()
in source/patterns/msk-standalone-cluster.ts
158 1 3
constructor()
in source/labs/msk-lambda-role.ts
157 1 3
constructor()
in source/patterns/kpl-kds-kda.ts
139 1 3
constructor()
in source/patterns/msk-lambda-kdf.ts
135 1 3
def _get_dashboard_body()
in source/lambda/msk-dashboard/lambda_function.py
134 2 3
constructor()
in source/patterns/msk-connector-s3.ts
109 1 3
constructor()
in source/lib/kdf-delivery-stream.ts
107 1 3
protected createRole()
in source/lib/kda-flink-studio.ts
76 2 1
constructor()
in source/lib/msk-cluster.ts
68 1 3
constructor()
in source/patterns/msk-lambda.ts
65 1 3
protected addDataStreamMetrics()
in source/lib/monitoring-base.ts
64 2 1
private addLambdaMetrics()
in source/lib/kds-monitoring.ts
63 2 1
private createInstanceProfile()
in source/lib/msk-client.ts
62 1 1
private addResourceUtilization()
in source/lib/kda-monitoring.ts
62 1 0