microsoft / data-accelerator
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 1,809 units with 22,417 lines of code in units (44.0% of code).
    • 5 very long units (1,073 lines of code)
    • 37 long units (2,383 lines of code)
    • 253 medium size units (7,189 lines of code)
    • 406 small units (5,823 lines of code)
    • 1,108 very small units (5,949 lines of code)
4% | 10% | 32% | 25% | 26%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
scala13% | 6% | 32% | 19% | 28%
js6% | 14% | 30% | 19% | 28%
cs1% | 10% | 32% | 29% | 25%
py0% | 0% | 0% | 62% | 37%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
DataProcessing/datax-host12% | 7% | 35% | 19% | 24%
Website/Packages10% | 9% | 37% | 16% | 25%
DataProcessing/datax-utility24% | 0% | 18% | 14% | 41%
Services/DataX.Flow2% | 15% | 38% | 28% | 15%
Services/DataX.SimulatedData17% | 33% | 19% | 18% | 11%
Website/Website0% | 23% | 16% | 26% | 34%
Services/DataX.Config0% | 5% | 29% | 32% | 32%
Services/JobRunner0% | 25% | 22% | 26% | 24%
Services/DataX.Gateway0% | 13% | 52% | 21% | 12%
Services/DataX.Metrics0% | 15% | 22% | 26% | 36%
Services/DataX.Utilities0% | 0% | 37% | 28% | 33%
Services/DataX.ServiceHost0% | 0% | 11% | 41% | 46%
Services/AspnetCore0% | 0% | 0% | 50% | 50%
DeploymentCloud/Deployment.Common0% | 0% | 0% | 62% | 37%
DataProcessing/datax-keyvault0% | 0% | 0% | 66% | 33%
DataProcessing/datax-core0% | 0% | 0% | 23% | 76%
Services/DataX.Contract0% | 0% | 0% | 17% | 82%
DataProcessing/datax-udf-samples0% | 0% | 0% | 0% | 100%
Services/JobRunnerWebJob0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def createProcessor()
in DataProcessing/datax-host/src/main/scala/datax/processor/CommonProcessorFactory.scala
453 48 1
export default()
in Website/Packages/datax-pipeline/src/modules/flowDefinition/flowReducer.js
264 62 2
private def getRandomJsonInternal()
in DataProcessing/datax-utility/src/main/scala/datax/utility/DataGenerator.scala
126 46 2
public async Task DeleteFlow()
in Services/DataX.Flow/DataX.Flow.DeleteHelper/ConfigDeleter.cs
123 33 1
public string GeneratePropertyString()
in Services/DataX.SimulatedData/DataX.SimulatedData.DataGenService/DataGen.cs
107 38 2
private async Task ProcessOutputs()
in Services/DataX.Config/DataX.Config/ConfigGeneration/Processor/S500_ResolveOutputs.cs
93 14 4
private string GenerateCodeHelper()
in Services/DataX.Flow/DataX.Flow.CodegenRules/Engine.cs
89 18 3
public override async Task Process()
in Services/DataX.Config/DataX.Config.Input.EventHub/Processor/CreateEventHubConsumerGroup.cs
84 22 1
public string Perform()
in Services/DataX.Flow/DataX.Flow.CodegenRules/Formatter.cs
83 22 0
protected override async Task RunAsync()
in Services/DataX.SimulatedData/DataX.SimulatedData.DataGenService/DataGenService.cs
81 21 1
public JObject GenerateRulesData()
in Services/DataX.SimulatedData/DataX.SimulatedData.DataGenService/DataGen.cs
77 24 2
async function run()
in Website/Website/server.js
76 7 1
public List Analyze()
in Services/DataX.Flow/DataX.Flow.SqlParser/SqlParser.cs
75 14 4
public string ExecuteCode()
in Services/DataX.Flow/DataX.Flow.InteractiveQuery/HDInsight/HDInsightKernel.cs
74 15 4
private void GetSchemaStruct()
in Services/DataX.Flow/DataX.Flow.SchemaInference/Engine.cs
74 17 3
private ApiResult LoadandRunSteps()
in Services/DataX.Flow/DataX.Flow.InteractiveQuery/KernelService.cs
73 8 4
public async Task ExecuteQueryAsync()
in Services/DataX.Flow/DataX.Flow.InteractiveQuery/KernelService.cs
70 12 2
exports.initialize = function()
in Website/Website/auth.js
70 6 1
private void GetSchemaArray()
in Services/DataX.Flow/DataX.Flow.SchemaInference/Engine.cs
69 20 3
function render()
in Website/Packages/datax-metrics/src/modules/metrics/components/d3.gauge.js
69 1 1