microsoft / vsts-work-item-migrator
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 358 units with 4,049 lines of code in units (66.7% of code).
    • 0 very long units (0 lines of code)
    • 10 long units (591 lines of code)
    • 40 medium size units (1,224 lines of code)
    • 82 small units (1,228 lines of code)
    • 226 very small units (1,006 lines of code)
0% | 14% | 30% | 30% | 24%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs0% | 14% | 30% | 30% | 24%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
Common/Migration/Phase10% | 28% | 22% | 26% | 21%
Common0% | 13% | 22% | 21% | 42%
Common/Migration/Phase20% | 24% | 15% | 40% | 19%
Common/Validation0% | 20% | 46% | 22% | 10%
WiMigrator0% | 35% | 43% | 9% | 11%
Common/Validation/WorkItem0% | 20% | 57% | 20% | 2%
Common/ApiWrappers0% | 23% | 35% | 10% | 31%
Logging0% | 0% | 30% | 37% | 31%
Common/Migration0% | 0% | 32% | 48% | 18%
Common/Validation/Target0% | 0% | 36% | 49% | 14%
Common/Config0% | 0% | 70% | 0% | 30%
Common/Validation/Configuration0% | 0% | 26% | 48% | 25%
Common/Extensions0% | 0% | 0% | 70% | 29%
Common/Migration/Phase30% | 0% | 0% | 57% | 42%
Common/Migration/Contexts0% | 0% | 0% | 0% | 100%
Common/Migration/ErrorHandling0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
private async Task UploadAttachmentFromSourceRelation()
in Common/Migration/Phase2/Processors/AttachmentsProcessor.cs
82 10 5
private async Task UploadInlineImageAttachmentFromSourceWorkItemToTarget()
in Common/Migration/Phase1/PreProcessors/InlineImagesPreProcessor.cs
69 8 4
public async Task Process()
in Common/Migration/Phase1/PreProcessors/IdentityPreProcessor.cs
65 14 1
public async Task Validate()
in Common/Validation/Validator.cs
59 12 0
private async Task ExecuteMigration()
in WiMigrator/CommandLine.cs
59 7 1
public async Task Prepare()
in Common/Validation/WorkItem/ValidateWorkItemTypes.cs
53 9 1
private void HandleBatchResponses()
in Common/ApiWrappers/BaseBatchApiWrapper.cs
51 9 4
public async Task Process()
in Common/Migration/Phase1/Processors/BaseWorkItemsProcessor.cs
51 5 1
51 9 4
51 5 4
public void SendEmail()
in Common/Emailer.cs
48 10 2
public async Task Validate()
in Common/Validation/WorkItem/ValidateClassificationNodes.cs
46 15 2
private void LogFinalStatus()
in Common/Migration/Migrator.cs
45 10 0
private void ValidateWorkItemTypeFidelity()
in Common/Validation/WorkItem/ValidateWorkItemTypes.cs
43 9 2
public async Task ExecuteWitBatchRequests()
in Common/ApiWrappers/BaseBatchApiWrapper.cs
42 5 5
protected KeyValuePair CreateTargetField()
in Common/Migration/Phase1/WitBatchRequestGenerators/BaseWitBatchRequestGenerator.cs
41 8 2
private async Task MigratePhase2()
in Common/Migration/Migrator.cs
40 6 0
public static void Retry()
in Logging/LoggingRetryHelper.cs
38 6 3
private async Task ExecuteValidation()
in WiMigrator/CommandLine.cs
38 6 1
private async Task MigratePhase3()
in Common/Migration/Migrator.cs
37 9 0