microsoft / Atlas
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 303 units with 3,832 lines of code in units (62.6% of code).
    • 3 very long units (454 lines of code)
    • 5 long units (392 lines of code)
    • 33 medium size units (1,014 lines of code)
    • 65 small units (900 lines of code)
    • 197 very small units (1,072 lines of code)
11% | 10% | 26% | 23% | 27%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs12% | 10% | 24% | 23% | 28%
ts0% | 0% | 86% | 11% | 2%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/Microsoft.Atlas.CommandLine/Execution35% | 14% | 14% | 12% | 22%
src/Microsoft.Atlas.CommandLine/Commands30% | 0% | 31% | 15% | 21%
src/Microsoft.Atlas.CommandLine/JsonClient79% | 0% | 0% | 15% | 5%
src/Microsoft.Atlas.CommandLine/Swagger0% | 40% | 19% | 28% | 11%
src/Microsoft.Atlas.CommandLine0% | 22% | 34% | 20% | 22%
src/Microsoft.Atlas.CommandLine/OAuth20% | 30% | 39% | 5% | 25%
src/Microsoft.Atlas.CommandLine/Templates0% | 0% | 38% | 31% | 29%
src/Tasks/AtlasV00% | 0% | 79% | 16% | 3%
src/Microsoft.Atlas.CommandLine/Blueprints0% | 0% | 16% | 38% | 44%
src/Microsoft.Atlas.CommandLine/ConsoleOutput0% | 0% | 50% | 28% | 21%
src/Tasks/AtlasInstallerV00% | 0% | 100% | 0% | 0%
src/Microsoft.Atlas.CommandLine/Accounts0% | 0% | 18% | 34% | 46%
src/Microsoft.Atlas.CommandLine/Serialization0% | 0% | 23% | 29% | 46%
src/Microsoft.Atlas.CommandLine/Targets0% | 0% | 37% | 19% | 43%
src/Microsoft.Atlas.CommandLine/Abstractions0% | 0% | 100% | 0% | 0%
src/Microsoft.Atlas.CommandLine/Secrets0% | 0% | 18% | 30% | 50%
src/Microsoft.Atlas.CommandLine/Queries0% | 0% | 0% | 42% | 57%
src/Microsoft.Atlas.CommandLine/Factories0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
private async Task ExecuteOperationInner()
in src/Microsoft.Atlas.CommandLine/Execution/WorkflowEngine.cs
224 31 1
public async Task ExecuteCore()
in src/Microsoft.Atlas.CommandLine/Commands/WorkflowCommands.cs
116 22 1
public async Task SendAsync()
in src/Microsoft.Atlas.CommandLine/JsonClient/JsonHttpClient.cs
114 18 1
private object ProcessValuesRecursive()
in src/Microsoft.Atlas.CommandLine/Execution/ValuesEngine.cs
90 20 3
public void GenerateSingleRequestDefinition()
in src/Microsoft.Atlas.CommandLine/Swagger/RequestGenerator.cs
89 19 1
public static void ConfigureApplicationCommands()
in src/Microsoft.Atlas.CommandLine/Program.cs
88 2 1
public async Task AcquireTokenAsync()
in src/Microsoft.Atlas.CommandLine/OAuth2/TokenProvider.cs
64 15 1
public async Task Initialize()
in src/Microsoft.Atlas.CommandLine/Swagger/SwaggerBlueprintDecorator.cs
61 9 1
public void Write()
in src/Microsoft.Atlas.CommandLine/ConsoleOutput/ColorConsole.cs
49 10 1
private async Task LoadEntry()
in src/Microsoft.Atlas.CommandLine/Swagger/SwaggarDocumentLoader.cs
49 6 2
private async Task SharedKeyAuthentication()
in src/Microsoft.Atlas.CommandLine/OAuth2/HttpClientFactory.cs
48 3 3
public static IServiceCollection AddServices()
in src/Microsoft.Atlas.CommandLine/Program.cs
48 1 1
async function run()
in src/Tasks/AtlasInstallerV0/src/index.ts
40 7 0
public async Task ExecutePreview()
in src/Microsoft.Atlas.CommandLine/Commands/SwaggerCommands.cs
37 5 0
public static object Merge()
in src/Microsoft.Atlas.CommandLine/Execution/MergeUtils.cs
36 7 2
public TemplateEngine()
in src/Microsoft.Atlas.CommandLine/Templates/TemplateEngine.cs
36 4 2
public async Task ExecuteAdd()
in src/Microsoft.Atlas.CommandLine/Commands/AccountCommands.cs
35 3 0
public HttpClient Create()
in src/Microsoft.Atlas.CommandLine/OAuth2/HttpClientFactory.cs
35 3 1
private async Task DecorateBlueprintPackage()
in src/Microsoft.Atlas.CommandLine/Blueprints/BlueprintManager.cs
34 7 1
private async Task ExecuteOperation()
in src/Microsoft.Atlas.CommandLine/Execution/WorkflowEngine.cs
32 5 1