awslabs / amazon-kinesis-video-streams-webrtc-sdk-js
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 354 lines of code in units (66.2% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (64 lines of code)
    • 2 medium size units (49 lines of code)
    • 5 small units (70 lines of code)
    • 36 very small units (171 lines of code)
0% | 18% | 13% | 19% | 48%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js0% | 65% | 0% | 0% | 34%
ts0% | 0% | 19% | 27% | 53%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
eslint0% | 65% | 0% | 0% | 34%
src0% | 0% | 21% | 30% | 47%
src/internal0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
ImportDeclaration()
in eslint/sorted-imports.js
64 18 1
public constructor()
in src/SignalingClient.ts
25 4 1
private onMessage()
in src/SignalingClient.ts
24 5 1
private static async hmac()
in src/SigV4RequestSigner.ts
17 2 2
private async asyncOpen()
in src/SignalingClient.ts
17 3 0
private sendMessage()
in src/SignalingClient.ts
13 3 3
private emitPendingIceCandidates()
in src/SignalingClient.ts
12 3 1
private emitOrQueueIceCandidate()
in src/SignalingClient.ts
11 4 2
private cleanupWebSocket()
in src/SignalingClient.ts
10 2 0
9 4 2
public open()
in src/SignalingClient.ts
9 2 0
fix()
in eslint/sorted-imports.js
9 2 1
private static toUint8Array()
in src/SigV4RequestSigner.ts
8 2 1
public close()
in src/SignalingClient.ts
8 3 0
private validateRecipientClientId()
in src/SignalingClient.ts
7 5 1
private async getSignatureKey()
in src/SigV4RequestSigner.ts
6 1 1
private static createQueryString()
in src/SigV4RequestSigner.ts
6 1 1
private static getDateTimeString()
in src/SigV4RequestSigner.ts
6 1 1
constructor()
in src/internal/testUtils.ts
6 2 1
public constructor()
in src/SigV4RequestSigner.ts
5 1 3