aws / cta
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 767 units with 10,538 lines of code in units (64.9% of code).
    • 6 very long units (1,091 lines of code)
    • 10 long units (609 lines of code)
    • 113 medium size units (3,284 lines of code)
    • 214 small units (3,073 lines of code)
    • 424 very small units (2,481 lines of code)
10% | 5% | 31% | 29% | 23%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs10% | 5% | 31% | 29% | 23%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/CTA.Rules.RuleFiles61% | 6% | 16% | 12% | 3%
src/CTA.Rules.Analysis75% | 0% | 13% | 8% | 2%
src/CTA.Rules.Actions7% | 3% | 31% | 44% | 13%
src/CTA.Rules.PortCore0% | 24% | 35% | 19% | 20%
src/CTA.Rules.Models0% | 15% | 18% | 11% | 53%
src/CTA.FeatureDetection.Common0% | 13% | 39% | 21% | 26%
src/CTA.Rules.Update0% | 6% | 68% | 18% | 7%
src/CTA.WebForms0% | 0% | 31% | 35% | 33%
src/CTA.FeatureDetection.Load0% | 0% | 31% | 40% | 28%
src/CTA.FeatureDetection.ProjectType0% | 0% | 36% | 11% | 51%
src/CTA.Rules.Config0% | 0% | 40% | 39% | 20%
src/CTA.Rules.ProjectFile0% | 0% | 35% | 56% | 8%
src/CTA.FeatureDetection0% | 0% | 38% | 36% | 25%
src/CTA.Rules.Metrics0% | 0% | 11% | 49% | 38%
src/CTA.Rules.Common0% | 0% | 0% | 55% | 44%
src/CTA.FeatureDetection.AuthType0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
private void ParseActions()
in src/CTA.Rules.RuleFiles/RulesFileParser.cs
315 37 2
private bool AnalyzeChildren()
in src/CTA.Rules.Analysis/RulesAnalysis.cs
258 55 5
public ActionsLoader()
in src/CTA.Rules.Actions/ActionsLoader.cs
147 21 1
private void ProcessObject()
in src/CTA.Rules.RuleFiles/RulesFileParser.cs
136 41 1
private void AddActions()
in src/CTA.Rules.Analysis/RulesAnalysis.cs
130 14 4
private void ProcessObject()
in src/CTA.Rules.RuleFiles/RulesFileParser.cs
105 44 1
public static void CodeBasedCheck()
in src/CTA.FeatureDetection.Common/WCFConfigUtils/WCFBindingAndTransportUtil.cs
81 16 2
public Func GetCompilationUnitAction()
in src/CTA.Rules.Actions/ActionsLoader.cs
71 4 2
public string ReplaceStartupFile()
in src/CTA.Rules.PortCore/ProjectSpecificPort/WCF/WCFServicePort.cs
64 15 1
public RootNodes Load()
in src/CTA.Rules.RuleFiles/RulesFileLoader.cs
61 14 0
public override string ToString()
in src/CTA.Rules.Models/ProjectActions.cs
59 13 0
public string ToSummaryString()
in src/CTA.Rules.Models/ProjectActions.cs
59 13 0
private void RunWCFChanges()
in src/CTA.Rules.PortCore/ProjectSpecificPort/ProjectRewriters/WCFProjectRewriter.cs
55 9 0
protected virtual List ApplyProjectActions()
in src/CTA.Rules.Update/CodeReplacer.cs
53 8 2
public static SyntaxNode ReplaceProgramNode()
in src/CTA.Rules.PortCore/ProjectSpecificPort/WCF/WCFServicePort.cs
53 8 3
static void Main()
in src/CTA.Rules.PortCore/Program.cs
53 6 1
private void AddNamedActions()
in src/CTA.Rules.Analysis/RulesAnalysis.cs
49 5 4
private void PopulateProperties()
in src/CTA.FeatureDetection.Common/Models/Features/Conditions/Base/Condition.cs
46 6 1
public async Task PerformMigration()
in src/CTA.WebForms/MigrationManager.cs
46 4 0
public FileConverter Build()
in src/CTA.WebForms/Factories/FileConverterFactory.cs
45 10 1