microsoft / Dynamics-AX-Integration
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 100 units with 2,200 lines of code in units (57.4% of code).
    • 1 very long units (449 lines of code)
    • 4 long units (243 lines of code)
    • 25 medium size units (822 lines of code)
    • 23 small units (372 lines of code)
    • 47 very small units (314 lines of code)
20% | 11% | 37% | 16% | 14%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs21% | 11% | 38% | 14% | 13%
php0% | 0% | 0% | 74% | 25%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
DIXFSamples/RecurringIntegrationApp33% | 18% | 17% | 14% | 16%
ServiceSamples/ServiceTests0% | 0% | 77% | 22% | 0%
ServiceSamples/ODataConsoleApplication0% | 0% | 58% | 11% | 29%
FileBasedIntegrationSamples/ConsoleAppSamples0% | 0% | 89% | 0% | 10%
ServiceSamples/AuthenticationUtility0% | 0% | 100% | 0% | 0%
ServiceSamples/TLSConsoleApplication0% | 0% | 100% | 0% | 0%
ServiceSamples/SoapConsoleApplication0% | 0% | 100% | 0% | 0%
ServiceSamples/SoapUtility0% | 0% | 77% | 0% | 22%
ServiceSamples/PHPConsoleApplication0% | 0% | 0% | 74% | 25%
ServiceSamples/JsonConsoleApplication0% | 0% | 0% | 100% | 0%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
private void InitializeComponent()
in DIXFSamples/RecurringIntegrationApp/Views/DIXFRecurringJobsProcessor.Designer.cs
449 1 0
public static bool InitSettings()
in DIXFSamples/RecurringIntegrationApp/Configuration/Settings.cs
75 11 0
public async Task ProcessInprocessQueue()
in DIXFSamples/RecurringIntegrationApp/Runtime/AdvancedDataFlowNetwork.cs
59 8 0
private async Task processInprocessQueue()
in DIXFSamples/RecurringIntegrationApp/Runtime/DefaultDataFlowNetwork.cs
58 7 0
public void updateStats()
in DIXFSamples/RecurringIntegrationApp/Views/DIXFRecurringJobsProcessor.cs
51 9 2
public static string GetAuthenticationHeader()
in ServiceSamples/AuthenticationUtility/OAuthHelper.cs
48 6 1
public void JsonServiceGroup1EchoComplexContractTest()
in ServiceSamples/ServiceTests/ServiceGroup1Tests.cs
48 1 0
private async Task postProcessMessageAsync()
in DIXFSamples/RecurringIntegrationApp/Runtime/DefaultDataFlowNetwork.cs
41 7 2
public void JsonServiceGroup1EchoContractListTest()
in ServiceSamples/ServiceTests/ServiceGroup1Tests.cs
41 1 0
static void Main()
in ServiceSamples/TLSConsoleApplication/Program.cs
40 4 1
private async Task updateStatsAsync()
in DIXFSamples/RecurringIntegrationApp/Runtime/DefaultDataFlowNetwork.cs
38 4 4
public void JsonWeaklyTypedContractTest()
in ServiceSamples/ServiceTests/JsonTests.cs
37 1 0
public void JsonWeaklyTypedServiceGroup1EchoStringTest()
in ServiceSamples/ServiceTests/ServiceGroup1Tests.cs
37 1 0
public static void ImportPackage()
in FileBasedIntegrationSamples/ConsoleAppSamples/DataPackageHandler/PackageImporter.cs
36 4 2
public void JsonSoapContractTest()
in ServiceSamples/ServiceTests/JsonTests.cs
34 1 0
public void JsonServiceGroup1EchoStringTest()
in ServiceSamples/ServiceTests/ServiceGroup1Tests.cs
34 1 0
public static void ExportPackage()
in FileBasedIntegrationSamples/ConsoleAppSamples/DataPackageHandler/PackageExporter.cs
33 7 2
static void ValidateMetadataDocument()
in ServiceSamples/ODataConsoleApplication/MetadataDocumentValidator.cs
33 7 1
private async Task writeStatusLogFileAsync()
in DIXFSamples/RecurringIntegrationApp/Runtime/DefaultDataFlowNetwork.cs
31 4 3
private async Task moveDataToTargetAsync()
in DIXFSamples/RecurringIntegrationApp/Runtime/DefaultDataFlowNetwork.cs
31 4 2