microsoft / VFSForGit
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 2,279 units with 36,013 lines of code in units (75.6% of code).
    • 18 very long units (2,473 lines of code)
    • 87 long units (5,854 lines of code)
    • 439 medium size units (13,326 lines of code)
    • 524 small units (7,840 lines of code)
    • 1,211 very small units (6,520 lines of code)
6% | 16% | 37% | 21% | 18%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs7% | 14% | 37% | 20% | 19%
cpp0% | 31% | 28% | 38% | 1%
h0% | 20% | 44% | 16% | 18%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
GVFS/GVFS25% | 16% | 42% | 11% | 4%
GVFS/GVFS.Common2% | 10% | 40% | 23% | 23%
GVFS/GVFS.Virtualization7% | 16% | 32% | 21% | 21%
GVFS/GVFS.Platform.Windows8% | 29% | 34% | 14% | 13%
GVFS/FastFetch12% | 24% | 35% | 18% | 9%
GVFS/GVFS.Service9% | 6% | 47% | 23% | 13%
GVFS/GVFS.NativeTests0% | 25% | 30% | 40% | 3%
GVFS/GVFS.Mount0% | 25% | 46% | 22% | 5%
GVFS/GVFS.FunctionalTests0% | 6% | 15% | 23% | 53%
GVFS/GVFS.VirtualFileSystemHook0% | 100% | 0% | 0% | 0%
GVFS/GitHooksLoader0% | 58% | 41% | 0% | 0%
GVFS/GVFS.Hooks0% | 16% | 38% | 25% | 20%
GVFS/GVFS.ReadObjectHook0% | 28% | 48% | 5% | 17%
GVFS/GVFS.PostIndexChangedHook0% | 100% | 0% | 0% | 0%
GVFS/GVFS.NativeHooks.Common0% | 33% | 40% | 17% | 8%
GVFS/GVFS.Service.UI0% | 0% | 73% | 5% | 21%
GVFS/GVFS.PerfProfiling0% | 0% | 74% | 0% | 25%
GVFS/GVFS.MSBuild0% | 0% | 71% | 16% | 11%
GVFS/GVFS.FunctionalTests.LockHolder0% | 0% | 31% | 57% | 10%
GVFS/GVFS.GVFlt0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
private FileSystemTaskResult ExecuteBackgroundOperation()
in GVFS/GVFS.Virtualization/FileSystemCallbacks.cs
220 51 1
public static bool StrictMatchPattern()
in GVFS/GVFS.Platform.Windows/PatternMatcher.cs
191 42 2
public override void Execute()
in GVFS/GVFS/CommandLine/CloneVerb.cs
173 19 0
private void EnsureLocalCacheIsHealthy()
in GVFS/GVFS/CommandLine/GVFSVerb.cs
161 23 5
public override void Execute()
in GVFS/GVFS/CommandLine/RepairVerb.cs
158 21 0
protected GitEndPointResponseData SendRequest()
in GVFS/GVFS.Common/Http/HttpRequestor.cs
153 19 6
protected override void Execute()
in GVFS/GVFS/CommandLine/SparseVerb.cs
151 31 1
private int ExecuteWithExitCode()
in GVFS/FastFetch/FastFetchVerb.cs
138 27 0
protected override void Execute()
in GVFS/GVFS/CommandLine/DehydrateVerb.cs
137 20 1
private Result CreateClone()
in GVFS/GVFS/CommandLine/CloneVerb.cs
130 21 5
protected override void Execute()
in GVFS/GVFS/CommandLine/MountVerb.cs
116 15 1
protected override void Execute()
in GVFS/GVFS/CommandLine/PrefetchVerb.cs
116 15 1
protected override void Execute()
in GVFS/GVFS/CommandLine/DiagnoseVerb.cs
109 9 1
public static bool TryEnablePrjFlt()
in GVFS/GVFS.Service/Handlers/EnableAndAttachProjFSHandler.cs
108 15 2
private void GetPlaceholderInformationAsyncHandler()
in GVFS/GVFS.Platform.Windows/WindowsFileSystemVirtualizer.cs
105 10 6
private void UpdatePlaceholders()
in GVFS/GVFS.Virtualization/Projection/GitIndexProjection.cs
105 17 0
101 12 6
public void PrefetchWithStats()
in GVFS/GVFS.Common/Prefetch/BlobPrefetcher.cs
101 14 6
private FileSystemTaskResult ParseIndex()
in GVFS/GVFS.Virtualization/Projection/GitIndexProjection.GitIndexParser.cs
99 19 4
private void GetFileStreamHandlerAsyncHandler()
in GVFS/GVFS.Platform.Windows/WindowsFileSystemVirtualizer.cs
96 11 7