microsoft / CosmicClone
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 122 units with 2,413 lines of code in units (69.4% of code).
    • 1 very long units (140 lines of code)
    • 8 long units (484 lines of code)
    • 34 medium size units (1,042 lines of code)
    • 31 small units (479 lines of code)
    • 48 very small units (268 lines of code)
5% | 20% | 43% | 19% | 11%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs5% | 20% | 43% | 19% | 11%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
CosmicCloneUI18% | 16% | 29% | 22% | 12%
CosmosCloneCommon/Utility0% | 28% | 42% | 22% | 6%
CosmosCloneCommon/Migrator0% | 22% | 66% | 2% | 8%
CloneConsoleRun/Sample0% | 0% | 54% | 26% | 19%
CosmosCloneCommon/Model0% | 0% | 0% | 62% | 37%
CloneConsoleRun0% | 0% | 0% | 67% | 32%
CosmosClone0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
void AddRuleWithData()
in CosmosClone/CosmicCloneUI/DataAnonymizationPage.xaml.cs
140 5 3
public List getScrubRules()
in CosmosClone/CosmicCloneUI/DataAnonymizationPage.xaml.cs
65 13 0
public List ScrubObjectList()
in CosmosClone/CosmosCloneCommon/Utility/ObjectScrubber.cs
65 13 2
public async Task ReadUploadInBatches()
in CosmosClone/CosmosCloneCommon/Migrator/DocumentMigrator.cs
64 8 1
private bool PerformAction()
in CosmosClone/CosmicCloneUI/MainWindow.xaml.cs
63 8 1
public JToken GetUpdatedJsonArrayValue()
in CosmosClone/CosmosCloneCommon/Utility/ObjectScrubber.cs
61 18 4
public List GetPropertyValues()
in CosmosClone/CosmosCloneCommon/Utility/ObjectScrubber.cs
58 13 3
public JToken GetDocumentShuffledToken()
in CosmosClone/CosmosCloneCommon/Utility/ObjectScrubber.cs
55 13 3
public async Task ReadUploadInBatches()
in CosmosClone/CosmosCloneCommon/Migrator/DataScrubMigrator.cs
53 6 2
public bool validateInput()
in CosmosClone/CosmicCloneUI/DataAnonymizationPage.xaml.cs
45 10 0
public async Task CreateTargetDocumentCollection()
in CosmosClone/CloneConsoleRun/Sample/CosmosSampleDBHelper.cs
41 5 3
void Worker_DoWork2()
in CosmosClone/CosmicCloneUI/MainWindow.xaml.cs
41 12 2
public async Task CreateTargetDocumentCollection()
in CosmosClone/CosmosCloneCommon/Utility/CosmosDBHelper.cs
41 5 3
public async Task InitializeMigration()
in CosmosClone/CosmosCloneCommon/Migrator/DocumentMigrator.cs
40 7 0
public async Task BulkSendToNewCollection()
in CosmosClone/CosmosCloneCommon/Utility/CosmosBulkImporter.cs
37 5 1
private async Task CopyTriggers()
in CosmosClone/CosmosCloneCommon/Migrator/CodeMigrator.cs
36 4 0
private async Task CopyUDFs()
in CosmosClone/CosmosCloneCommon/Migrator/CodeMigrator.cs
36 4 0
private async Task CopyStoredProcedures()
in CosmosClone/CosmosCloneCommon/Migrator/CodeMigrator.cs
36 4 0
private async Task CopyTriggers()
in CosmosClone/CosmosCloneCommon/Migrator/DocumentMigrator.cs
36 4 0
private async Task CopyUDFs()
in CosmosClone/CosmosCloneCommon/Migrator/DocumentMigrator.cs
36 4 0