microsoft / ajaxmin
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,418 units with 40,823 lines of code in units (80.3% of code).
    • 46 very long units (8,563 lines of code)
    • 116 long units (8,247 lines of code)
    • 329 medium size units (10,434 lines of code)
    • 413 small units (6,155 lines of code)
    • 1,514 very small units (7,424 lines of code)
20% | 20% | 25% | 15% | 18%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs20% | 20% | 25% | 15% | 18%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
AjaxMinDll22% | 19% | 27% | 15% | 15%
AjaxMin27% | 32% | 21% | 13% | 4%
AjaxMinTask28% | 30% | 28% | 9% | 3%
DllUnitTest0% | 22% | 33% | 32% | 11%
JSUnitTest0% | 4% | 0% | 5% | 90%
Deployment0% | 0% | 100% | 0% | 0%
CssUnitTest0% | 0% | 0% | 5% | 94%
AjaxMinDll20050% | 0% | 0% | 29% | 70%
AjaxMinStub0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
public void Parse()
in AjaxMinDll/SwitchParser.cs
1197 258 1
public override void Visit()
in AjaxMinDll/JavaScript/AnalyzeNodeVisitor.cs
595 149 1
public Context ScanNextToken()
in AjaxMinDll/JavaScript/jsscanner.cs
594 192 0
private bool Append()
in AjaxMinDll/Css/CssParser.cs
328 99 2
private AstNode ParseLeftHandSideExpression()
in AjaxMinDll/JavaScript/jsparser.cs
276 48 1
private void ScanString()
in AjaxMinDll/JavaScript/jsscanner.cs
239 63 1
private void OnUnknownParameter()
in AjaxMin/MainClass.cs
226 62 2
public override void Visit()
in AjaxMinDll/JavaScript/AnalyzeNodeVisitor.cs
205 60 1
private Parsed ParseTerm()
in AjaxMinDll/Css/CssParser.cs
197 51 1
private int ProcessOutputGroup()
in AjaxMin/MainClass.cs
163 32 2
private Parsed ParseRgb()
in AjaxMinDll/Css/CssParser.cs
158 30 0
private void ProcessScope()
in AjaxMin/XmlScopeReport.cs
157 42 1
private ColorSlice()
in AjaxMinDll/Css/CssColorName.cs
152 1 0
public override void Visit()
in AjaxMinDll/JavaScript/AnalyzeNodeVisitor.cs
152 47 1
public override void Visit()
in AjaxMinDll/JavaScript/AnalyzeNodeVisitor.cs
150 39 1
public static string EscapeString()
in AjaxMinDll/JavaScript/OutputVisitor.cs
150 37 1
private AstNode ParseExport()
in AjaxMinDll/JavaScript/jsparser.cs
148 19 0
private AstNode ParseUnaryExpression()
in AjaxMinDll/JavaScript/jsparser.cs
148 23 2
private void DoBinaryOperator()
in AjaxMinDll/JavaScript/EvaluateLiteralVisitor.cs
140 34 1
private Block InternalParse()
in AjaxMinDll/JavaScript/jsparser.cs
140 17 0