microsoft / typed-rest-client
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 84 units with 1,045 lines of code in units (71.4% of code).
    • 0 very long units (0 lines of code)
    • 5 long units (316 lines of code)
    • 7 medium size units (216 lines of code)
    • 15 small units (202 lines of code)
    • 57 very small units (311 lines of code)
0% | 30% | 20% | 19% | 29%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts0% | 33% | 22% | 14% | 29%
js0% | 23% | 16% | 28% | 31%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lib0% | 40% | 21% | 11% | 26%
lib/opensource/Node-SMB/lib0% | 37% | 26% | 20% | 15%
lib/handlers0% | 0% | 30% | 30% | 40%
ROOT0% | 0% | 0% | 42% | 57%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
function encodeType3()
in lib/opensource/Node-SMB/lib/ntlm.js
87 1 5
public async request()
in lib/HttpClient.ts
64 25 4
private _getAgent()
in lib/HttpClient.ts
57 26 1
constructor()
in lib/HttpClient.ts
56 20 3
52 15 2
41 9 4
function encodeType1()
in lib/opensource/Node-SMB/lib/ntlm.js
40 1 2
private sendType3Message()
in lib/handlers/ntlm.ts
36 5 5
private _getProxy()
in lib/HttpClient.ts
28 9 1
private _prepareRequest()
in lib/HttpClient.ts
25 11 3
25 10 3
function lmhashbuf()
in lib/opensource/Node-SMB/lib/smbhash.js
21 1 1
function findLicense()
in generate-third-party-notice.js
20 7 1
19 3 4
private _headersFromOptions()
in lib/RestClient.ts
17 8 2
private sendType1Message()
in lib/handlers/ntlm.ts
17 2 4
14 3 1
function expandkey()
in lib/opensource/Node-SMB/lib/common.js
13 1 1
12 3 1
12 5 1