microsoft / Orb
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 137 units with 1,569 lines of code in units (43.5% of code).
    • 0 very long units (0 lines of code)
    • 8 long units (510 lines of code)
    • 9 medium size units (337 lines of code)
    • 14 small units (201 lines of code)
    • 106 very small units (521 lines of code)
0% | 32% | 21% | 12% | 33%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js0% | 30% | 15% | 10% | 42%
ts0% | 30% | 20% | 6% | 43%
cs0% | 31% | 29% | 15% | 23%
cc0% | 42% | 25% | 25% | 6%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
node_modules_native/node_modules_forked/node-pty/src0% | 34% | 21% | 12% | 30%
node_modules_native/node_modules_forked/node-pty/lib0% | 25% | 18% | 10% | 45%
dotNet/PsEdge0% | 37% | 22% | 13% | 26%
build0% | 63% | 0% | 0% | 36%
dotNet/AuthEdge0% | 0% | 67% | 27% | 5%
node_modules_native/node_modules_forked/node-pty/scripts0% | 0% | 0% | 100% | 0%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
static NAN_METHOD()
in node_modules_native/node_modules_forked/node-pty/src/win/pty.cc
96 19 1
constructor()
in node_modules_native/node_modules_forked/node-pty/src/unixTerminal.ts
72 26 3
function UnixTerminal()
in node_modules_native/node_modules_forked/node-pty/lib/unixTerminal.js
64 25 3
public override Dictionary Prompt()
in dotNet/PsEdge/PsHostUI.cs
61 10 3
public override int PromptForChoice()
in dotNet/PsEdge/PsHostUI.cs
56 9 4
function WindowsTerminal()
in node_modules_native/node_modules_forked/node-pty/lib/windowsTerminal.js
55 18 3
version: getBuildVersion()
in build/gulpfile.js
53 7 0
constructor()
in node_modules_native/node_modules_forked/node-pty/src/windowsTerminal.ts
53 17 3
function argsToCommandLine()
in node_modules_native/node_modules_forked/node-pty/lib/windowsPtyAgent.js
48 12 2
export function argsToCommandLine()
in node_modules_native/node_modules_forked/node-pty/src/windowsPtyAgent.ts
46 12 2
41 4 6
public async Task AcquireToken()
in dotNet/AuthEdge/AuthEdge.cs
40 5 1
UnixTerminal.open = function()
in node_modules_native/node_modules_forked/node-pty/lib/unixTerminal.js
38 9 1
public static open()
in node_modules_native/node_modules_forked/node-pty/src/unixTerminal.ts
38 9 1
std::wstring get_shell_path()
in node_modules_native/node_modules_forked/node-pty/src/win/path_util.cc
33 7 1
public async Task CreateRunspacePool()
in dotNet/PsEdge/PsEdge.cs
29 4 1
static NAN_METHOD()
in node_modules_native/node_modules_forked/node-pty/src/win/pty.cc
24 7 1
function WindowsPtyAgent()
in node_modules_native/node_modules_forked/node-pty/lib/windowsPtyAgent.js
19 1 7
static NAN_METHOD()
in node_modules_native/node_modules_forked/node-pty/src/win/pty.cc
18 4 1
16 3 2