aws-samples / amazon-chime-sdk-aws-appsync-sample
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 25 units with 541 lines of code in units (48.5% of code).
    • 0 very long units (0 lines of code)
    • 3 long units (224 lines of code)
    • 7 medium size units (196 lines of code)
    • 5 small units (74 lines of code)
    • 10 very small units (47 lines of code)
0% | 41% | 36% | 13% | 8%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts0% | 53% | 29% | 10% | 6%
tsx0% | 0% | 78% | 0% | 21%
py0% | 0% | 0% | 100% | 0%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
Infra/lib/stack0% | 90% | 0% | 6% | 3%
Website/src/containers0% | 0% | 78% | 0% | 21%
Website/src0% | 0% | 63% | 36% | 0%
Infra/lib/constructs0% | 0% | 100% | 0% | 0%
Infra/lib0% | 0% | 100% | 0% | 0%
Infra/lib/custom-resources0% | 0% | 0% | 100% | 0%
Website/src/api0% | 0% | 0% | 0% | 100%
Lambdas/ChimeCallService/src0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
constructor()
in Infra/lib/stack/CognitoAuthStack.ts
94 1 3
constructor()
in Infra/lib/stack/StaticWebsiteStack.ts
70 1 3
constructor()
in Infra/lib/stack/AppSyncStack.ts
60 1 3
constructor()
in Infra/lib/constructs/MeetingProvider.ts
46 1 3
function registerValidSW()
in Website/src/serviceWorker.ts
33 8 2
meeting: graphqlify()
in Website/src/containers/Home/HomeContainer.tsx
25 3 1
meeting: graphqlify()
in Website/src/containers/Home/HomeContainer.tsx
24 2 1
attendee: graphqlify()
in Website/src/containers/Home/HomeContainer.tsx
24 3 1
export function register()
in Website/src/serviceWorker.ts
22 5 1
constructor()
in Infra/lib/AppStacks.ts
22 1 2
function checkValidServiceWorker()
in Website/src/serviceWorker.ts
20 4 2
constructor()
in Infra/lib/stack/ApiStack.ts
15 1 3
def on_event()
in Infra/lib/custom-resources/upload-website-config/app.py
14 4 2
def update_website_config()
in Infra/lib/custom-resources/upload-website-config/app.py
14 1 4
export function unregister()
in Website/src/serviceWorker.ts
11 2 0
async createChimeSession()
in Website/src/api/ChimeCallServiceClient.ts
9 2 0
constructor()
in Infra/lib/stack/UserPoolStack.ts
9 1 2
startChimeSession()
in Website/src/containers/Home/HomeContainer.tsx
5 1 3
ExternalUserId: uuid()
in Lambdas/ChimeCallService/src/index.ts
5 1 0
onClick: async()
in Website/src/containers/App/index.tsx
4 1 0