microsoft / ClearScript
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 4,441 units with 54,415 lines of code in units (64.8% of code).
    • 22 very long units (9,132 lines of code)
    • 59 long units (3,818 lines of code)
    • 444 medium size units (13,416 lines of code)
    • 789 small units (11,524 lines of code)
    • 3,127 very small units (16,525 lines of code)
16% | 7% | 24% | 21% | 30%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs17% | 7% | 24% | 21% | 28%
cpp13% | 6% | 34% | 18% | 26%
h0% | 0% | 3% | 8% | 88%
js0% | 0% | 0% | 0% | 100%
vbs0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ClearScript32% | 6% | 20% | 16% | 23%
ClearScriptV810% | 4% | 27% | 16% | 41%
ClearScriptTest0% | 6% | 28% | 28% | 36%
ClearScriptBenchmarks0% | 83% | 0% | 4% | 11%
ClearScriptConsole0% | 27% | 30% | 39% | 2%
UWP0% | 0% | 61% | 0% | 38%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
private static extern IntPtr V8SplitProxyManaged_SetMethodTable()
in ClearScript/V8/SplitProxy/V8SplitProxyNative.Generated.cs
805 1 1
private static extern IntPtr V8SplitProxyManaged_SetMethodTable()
in ClearScript/V8/SplitProxy/V8SplitProxyNative.Generated.cs
805 1 1
private static extern IntPtr V8SplitProxyManaged_SetMethodTable()
in ClearScript/V8/SplitProxy/V8SplitProxyNative.Generated.cs
805 1 1
private static extern IntPtr V8SplitProxyManaged_SetMethodTable()
in ClearScript/V8/SplitProxy/V8SplitProxyNative.Generated.cs
805 1 1
private static extern IntPtr V8SplitProxyManaged_SetMethodTable()
in ClearScript/V8/SplitProxy/V8SplitProxyNative.Generated.cs
805 1 1
private static extern IntPtr V8SplitProxyManaged_SetMethodTable()
in ClearScript/V8/SplitProxy/V8SplitProxyNative.Generated.cs
805 1 1
private static extern IntPtr V8SplitProxyManaged_SetMethodTable()
in ClearScript/V8/SplitProxy/V8SplitProxyNative.Generated.cs
805 1 1
private static extern IntPtr V8SplitProxyManaged_SetMethodTable()
in ClearScript/V8/SplitProxy/V8SplitProxyNative.UWP.Generated.cs
805 1 1
private static extern IntPtr V8SplitProxyManaged_SetMethodTable()
in ClearScript/V8/SplitProxy/V8SplitProxyNative.UWP.Generated.cs
805 1 1
private delegate void RawScheduleForwardingException()
in ClearScript/V8/SplitProxy/V8SplitProxyManaged.cs
305 1 1
void V8ContextImpl::Verify()
in ClearScriptV8/V8ContextImpl.cpp
170 38 2
V8Value V8ContextImpl::ExportValue()
in ClearScriptV8/V8ContextImpl.cpp
159 37 1
v8::Local V8ContextImpl::ImportValue()
in ClearScriptV8/V8ContextImpl.cpp
156 33 1
private object InvokeHostMember()
in ClearScript/HostItem.cs
140 34 6
public static void Set()
in ClearScript/V8/SplitProxy/V8SplitProxyHelpers.cs
138 21 2
public function getCommandResult()
in ClearScript/Windows/Core/VBScriptEngine.cs
137 18 1
private object GetHostProperty()
in ClearScript/HostItem.cs
131 33 7
internal V8ScriptEngine()
in ClearScript/V8/V8ScriptEngine.cs
123 17 5
private void EnsurePatched()
in ClearScript/HostItem.NetCore.cs
107 15 0
107 29 4