microsoft / Kusto-Query-Language
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,151 units with 48,556 lines of code in units (76.4% of code).
    • 19 very long units (6,444 lines of code)
    • 59 long units (4,088 lines of code)
    • 332 medium size units (10,084 lines of code)
    • 841 small units (11,688 lines of code)
    • 2,900 very small units (16,252 lines of code)
13% | 8% | 20% | 24% | 33%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs13% | 8% | 20% | 24% | 33%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
Kusto.Language/Parser20% | 7% | 24% | 26% | 20%
Kusto.Language/Binder14% | 12% | 31% | 25% | 16%
Kusto.Language48% | 8% | 14% | 17% | 11%
Kusto.Language/Syntax5% | <1% | 4% | 20% | 67%
Kusto.Language/Editor1% | 19% | 35% | 25% | 18%
Kusto.Language/Symbols0% | 17% | 26% | 19% | 36%
Kusto.Language/Utils0% | 5% | 10% | 41% | 43%
Kusto.Language/Semantics0% | 0% | 33% | 12% | 54%
Kusto.Language/Diagnostics0% | 0% | 4% | 13% | 82%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
private void Initialize()
in src/Kusto.Language/Parser/QueryGrammar.cs
2433 50 0
private static TypeSymbol SeriesDecomposeResult()
in src/Kusto.Language/Functions.cs
568 1 3
static SyntaxFacts()
in src/Kusto.Language/Syntax/SyntaxFacts.cs
561 6 0
private static string PropertyList()
in src/Kusto.Language/EngineCommands.cs
444 2 1
private static IReadOnlyDictionary CreateRulesMap()
in src/Kusto.Language/Parser/CommandParserFactory.cs
324 9 2
private void CreateProjectionColumns()
in src/Kusto.Language/Binder/Binder.cs
267 59 7
private static OperatorSymbol Binary()
in src/Kusto.Language/Operators.cs
235 1 4
private void WriteClassesImpl()
in src/Kusto.Language/Syntax/CodeGen/CslTreeGenerator.cs
205 31 0
private void CheckArgument()
in src/Kusto.Language/Binder/Binder.cs
178 55 6
public override SemanticInfo VisitFindOperator()
in src/Kusto.Language/Binder/Binder_NodeBinder.cs
151 32 1
public static ParameterMatchKind GetParameterMatchKind()
in src/Kusto.Language/Binder/Binder.cs
150 61 7
private static Parser CreateParser()
in src/Kusto.Language/Parser/Grammars/GrammarParser.cs
141 5 0
private static SyntaxKind GetInfixOperationKind()
in src/Kusto.Language/Parser/QueryParser.cs
122 58 1
private SemanticInfo GetMatchingSymbolResult()
in src/Kusto.Language/Binder/Binder.cs
121 23 4
private static OperatorKind GetOperatorKind()
in src/Kusto.Language/Binder/Binder.cs
118 56 1
private bool GetMatchingSymbols()
in src/Kusto.Language/Binder/Binder.cs
109 40 4
private CompletionItem GetSymbolCompletionItem()
in src/Kusto.Language/Editor/Kusto/KustoCompleter.cs
108 27 3
private void GetSymbolsInContext()
in src/Kusto.Language/Binder/Binder.cs
107 32 4
private SignatureResult GetSignatureResult()
in src/Kusto.Language/Binder/Binder.cs
102 47 5
protected static IReadOnlyList Add()
in src/Kusto.Language/Editor/CommonCodeService.cs
100 23 2