aws-samples / amazon-location-service-pettracker-demo
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 34 units with 562 lines of code in units (21.2% of code).
    • 0 very long units (0 lines of code)
    • 4 long units (247 lines of code)
    • 4 medium size units (127 lines of code)
    • 3 small units (52 lines of code)
    • 23 very small units (136 lines of code)
0% | 43% | 22% | 9% | 24%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts0% | 73% | 13% | 13% | 0%
py0% | 32% | 50% | 9% | 7%
js0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
cdk/lib0% | 73% | 13% | 13% | 0%
cdk/lib/custom-certificate-handler0% | 70% | 29% | 0% | 0%
cdk/lib/custom-tracker-handler0% | 0% | 100% | 0% | 0%
cdk/lib/tracker-lambda0% | 0% | 0% | 100% | 0%
cdk/lib/position-lambda0% | 0% | 0% | 0% | 100%
web/src/graphql0% | 0% | 0% | 0% | 100%
emulator0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
constructor()
in cdk/lib/pettracker-position-lambda.ts
66 1 3
constructor()
in cdk/lib/pettracker-als-lambda.ts
63 1 3
def handler()
in cdk/lib/custom-certificate-handler/custom-certificate-lambda.py
62 7 2
constructor()
in cdk/lib/data-ingestion-stack.ts
56 3 3
def handler()
in cdk/lib/custom-tracker-handler/custom-tracker-lambda.py
42 5 2
constructor()
in cdk/lib/pipeline-stack.ts
33 1 3
def send()
in cdk/lib/custom-tracker-handler/cfnresponse.py
26 3 6
def send()
in cdk/lib/custom-certificate-handler/cfnresponse.py
26 3 6
constructor()
in cdk/lib/webapp-stack.ts
19 3 3
def lambda_handler()
in cdk/lib/tracker-lambda/lambda_function.py
18 1 2
constructor()
in cdk/lib/pipeline-stack.ts
15 1 3
listLocations()
in cdk/lib/position-lambda/graphql/queries.js
10 1 3
listLocations()
in web/src/graphql/queries.js
10 1 3
createLocation()
in cdk/lib/position-lambda/graphql/mutations.js
7 1 2
deleteLocation()
in cdk/lib/position-lambda/graphql/mutations.js
7 1 2
updateLocation()
in cdk/lib/position-lambda/graphql/mutations.js
7 1 2
getLocation()
in cdk/lib/position-lambda/graphql/queries.js
7 1 1
deleteLocation()
in web/src/graphql/mutations.js
7 1 2
createLocation()
in web/src/graphql/mutations.js
7 1 2
updateLocation()
in web/src/graphql/mutations.js
7 1 2