microsoft / nodejstools
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 3,544 units with 45,550 lines of code in units (60.9% of code).
    • 13 very long units (2,426 lines of code)
    • 103 long units (6,767 lines of code)
    • 451 medium size units (13,980 lines of code)
    • 729 small units (10,440 lines of code)
    • 2,248 very small units (11,937 lines of code)
5% | 14% | 30% | 22% | 26%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs5% | 14% | 30% | 22% | 26%
js0% | 23% | 39% | 20% | 16%
ts0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
Nodejs/Product/Nodejs5% | 13% | 30% | 22% | 27%
Nodejs/Product/LogConverter21% | 37% | 20% | 8% | 13%
Nodejs/Product/Profiling5% | 20% | 23% | 24% | 25%
Nodejs/Product/TestAdapter0% | 27% | 32% | 21% | 19%
Nodejs/Product/Npm0% | 7% | 34% | 31% | 26%
Nodejs/Product/WebRole0% | 41% | 23% | 19% | 16%
Nodejs/Product/TestAdapterImpl0% | 7% | 41% | 32% | 18%
Common/Product/SharedProject0% | 7% | 44% | 28% | 19%
Nodejs/Product/TestAdapterNetStandard0% | 58% | 0% | 20% | 20%
Nodejs/Product/ProjectWizard0% | 0% | 27% | 9% | 62%
Nodejs/Product/TypeScript0% | 0% | 57% | 11% | 31%
Nodejs/Product/PressAnyKey0% | 0% | 100% | 0% | 0%
Nodejs/Prerequisites0% | 0% | 0% | 62% | 37%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
private void InitializeComponent()
in Nodejs/Product/Nodejs/Project/NodejsGeneralPropertyPageControl.Designer.cs
406 1 0
internal int AddItemWithSpecificInternal()
in Nodejs/Product/Nodejs/SharedProject/ProjectNode.cs
322 67 12
static EntityTable()
in Nodejs/Product/Nodejs/Jade/EntityTable.cs
270 1 0
private Addition CanAddFileFromProjectReference()
in Nodejs/Product/Nodejs/SharedProject/ProjectNode.CopyPaste.cs
194 37 3
public virtual object GetProperty()
in Nodejs/Product/Nodejs/SharedProject/HierarchyNode.cs
192 56 1
public void Process()
in Nodejs/Product/LogConverter/LogParsing/LogConverter.cs
186 19 0
internal static void WriteProjectXml()
in Nodejs/Product/Nodejs/Project/ImportWizard/ImportSettings.cs
152 12 6
private void OnTag()
in Nodejs/Product/Nodejs/Jade/Tokenizer/States/TagState.cs
137 36 0
public override void DoAddition()
in Nodejs/Product/Nodejs/SharedProject/ProjectNode.CopyPaste.cs
127 24 1
public override int GetProperty()
in Nodejs/Product/Profiling/Profiling/SessionNode.cs
115 33 3
private static InteractiveWindowColor? GetColorFromEscape()
in Nodejs/Product/Nodejs/Repl/NodejsReplEvaluator.cs
113 56 2
private Addition CanAddFolderFromProjectReference()
in Nodejs/Product/Nodejs/SharedProject/ProjectNode.CopyPaste.cs
109 19 1
public virtual int SaveItem()
in Nodejs/Product/Nodejs/SharedProject/ProjectNode.cs
103 27 5
internal static void UpdateServiceDefinition()
in Nodejs/Product/Nodejs/NodejsProject.cs
99 16 4
private void ListenerThread()
in Nodejs/Product/Nodejs/JsonListener.cs
91 23 0
private int AddDirectory()
in Nodejs/Product/Nodejs/SharedProject/ProjectNode.cs
90 13 4
private async Task WebSocketRequestHandler()
in Nodejs/Product/WebRole/WebSocketProxyBase.cs
89 10 1
private static void BuildRegions()
in Nodejs/Product/Nodejs/Jade/Outlining/IndentBasedRegionBuilder.cs
88 19 2
private string CreatePdbFile()
in Nodejs/Product/LogConverter/LogParsing/LogConverter.cs
87 12 2
private int Open()
in Nodejs/Product/Nodejs/SharedProject/FileDocumentManager.cs
84 19 10