microsoft / azure-pipelines-extensions
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 902 units with 10,687 lines of code in units (42.5% of code).
    • 1 very long units (142 lines of code)
    • 22 long units (1,462 lines of code)
    • 127 medium size units (3,798 lines of code)
    • 161 small units (2,367 lines of code)
    • 591 very small units (2,918 lines of code)
1% | 13% | 35% | 22% | 27%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js3% | 22% | 27% | 22% | 24%
ts0% | 10% | 43% | 22% | 23%
cs0% | 0% | 36% | 27% | 35%
tsx0% | 0% | 35% | 10% | 53%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT19% | 37% | 19% | 10% | 14%
Extensions/ExternalTfs0% | 36% | 21% | 24% | 17%
Extensions/GoogleAnalyticsExperiments0% | 13% | 30% | 22% | 32%
Extensions/Optimizely0% | 13% | 29% | 26% | 30%
Extensions/ArtifactEngine0% | 11% | 54% | 15% | 18%
Extensions/Common0% | 11% | 34% | 14% | 40%
Extensions/Terraform0% | 13% | 24% | 28% | 33%
Extensions/CircleCI0% | 21% | 36% | 31% | 10%
Extensions/CopyStageVariableToReleaseVariable0% | 100% | 0% | 0% | 0%
Extensions/Ansible0% | 0% | 42% | 32% | 25%
Extensions/DataSources0% | 0% | 49% | 15% | 35%
ServerTaskHelper/AzureFunctionSample0% | 0% | 84% | 13% | 1%
Extensions/AzureExp0% | 0% | 60% | 31% | 7%
ServerTaskHelper/HttpRequestSampleWithoutHandler0% | 0% | 44% | 26% | 28%
ServerTaskHelper/DistributedTask.ServerTask.Remote.Common0% | 0% | 28% | 26% | 45%
Extensions/TeamCity0% | 0% | 80% | 19% | 0%
Extensions/BitBucket0% | 0% | 33% | 28% | 37%
ServerTaskHelper/ServiceBusMessageHandler0% | 0% | 0% | 40% | 59%
ServerTaskHelper/AzureFunctionHandler0% | 0% | 0% | 71% | 28%
ServerTaskHelper/HttpRequestHandler0% | 0% | 0% | 28% | 71%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
function handoff()
in gulpfile.js
142 20 1
function setupAmdLoader()
in Extensions/GoogleAnalyticsExperiments/Src/UIContribution/lib/VSS.SDK.js
100 30 0
function setupAmdLoader()
in Extensions/Optimizely/Src/UIContribution/lib/VSS.SDK.js
100 30 0
function getCode()
in Extensions/ExternalTfs/Src/Tasks/DownloadArtifactsTfsVersionControl/downloadTfsVersionControl.js
89 10 0
async function main()
in Extensions/ExternalTfs/Src/Tasks/DownloadExternalBuildArtifacts/download.ts
80 10 0
function createType3Message()
in Extensions/ArtifactEngine/Providers/typed-rest-client/opensource/node-http-ntlm/ntlm.js
75 4 2
74 9 2
function()
in package.js
73 13 3
67 10 3
(function (VSS)()
in Extensions/GoogleAnalyticsExperiments/Src/UIContribution/lib/VSS.SDK.js
66 6 1
(function (VSS)()
in Extensions/Optimizely/Src/UIContribution/lib/VSS.SDK.js
66 6 1
private GetCommits()
in Extensions/CircleCI/Src/Tasks/DownloadCircleCIArtifacts/commitsdownloader.ts
60 8 2
exec()
in Extensions/Common/lib/vsts-task-lib/toolRunner.js
60 21 1
async function run()
in Extensions/CopyStageVariableToReleaseVariable/Src/Tasks/CopyAgentJobVariableToReleaseVariable/copyvartorelease.ts
60 9 0
59 15 1
GitWrapper.prototype.exec = function()
in Extensions/ExternalTfs/Src/Tasks/DownloadArtifactsTfsGit/gitwrapper.js
57 14 2
public logSummary()
in Extensions/ArtifactEngine/Engine/logger.ts
55 7 0
private _getAgent()
in Extensions/ArtifactEngine/Providers/typed-rest-client/HttpClient.ts
55 25 1
public setOutputVariableToPlanFilePath()
in Extensions/Terraform/Src/Tasks/TerraformTask/TerraformTaskV1/src/base-terraform-command-handler.ts
55 5 0
public setOutputVariableToPlanFilePath()
in Extensions/Terraform/Src/Tasks/TerraformTask/TerraformTaskV2/src/base-terraform-command-handler.ts
55 5 0