microsoft / azure-pipelines-agent
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 2,265 units with 46,273 lines of code in units (72.3% of code).
    • 8 very complex units (2,989 lines of code)
    • 20 complex units (3,364 lines of code)
    • 100 medium complex units (8,012 lines of code)
    • 229 simple units (9,378 lines of code)
    • 1,908 very simple units (22,530 lines of code)
6% | 7% | 17% | 20% | 48%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
cs6% | 7% | 17% | 20% | 48%
js0% | 0% | 0% | 35% | 64%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/Agent.Worker5% | 10% | 17% | 21% | 45%
src/Agent.Plugins13% | 5% | 15% | 18% | 47%
src/Agent.Listener8% | 8% | 18% | 14% | 49%
src/Agent.Sdk0% | 4% | 15% | 23% | 57%
src/Microsoft.VisualStudio.Services.Agent0% | 0% | 17% | 25% | 56%
src/Agent.PluginHost0% | 0% | 91% | 0% | 8%
src/Agent.Service0% | 0% | 30% | 39% | 30%
release0% | 0% | 0% | 28% | 71%
src/Misc0% | 0% | 0% | 100% | 0%
tools/CredScanRegexes0% | 0% | 0% | 22% | 77%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
public async Task GetSourceAsync()
in src/Agent.Plugins/GitSourceProvider.cs
760 163 3
public async Task GetSourceAsync()
in src/Agent.Worker/Build/GitSourceProvider.cs
628 127 3
internal static void WritePhase()
in src/Agent.Listener/DistributedTask.Pipelines/Yaml/TypeConverters/ConverterUtil.phases.cs
261 72 3
public async Task ConfigureAsync()
in src/Agent.Listener/Configuration/ConfigurationManager.cs
357 62 1
public async Task RunAsync()
in src/Agent.Worker/TaskRunner.cs
279 57 0
public async Task GetSourceAsync()
in src/Agent.Plugins/TfsVCSourceProvider.cs
312 55 3
public TestRunData ReadResults()
in src/Agent.Worker/TestResults/Legacy/XunitResultReader.cs
203 55 3
internal static void WriteStep()
in src/Agent.Listener/DistributedTask.Pipelines/Yaml/TypeConverters/ConverterUtil.steps.cs
189 51 3
private async Task StartContainerAsync()
in src/Agent.Worker/ContainerOperationProvider.cs
270 49 2
public async Task GetSourceAsync()
in src/Agent.Worker/Build/TfsVCSourceProvider.cs
298 48 3
private List ReadActualResults()
in src/Agent.Worker/TestResults/Legacy/TrxResultReader.cs
163 47 2
protected override async Task ProcessCommandInternalAsync()
in src/Agent.Plugins/BuildArtifact/BuildArtifactPluginV1.cs
220 45 2
private static void InitVersions()
in src/Agent.Sdk/Util/NetFrameworkUtil.cs
141 40 1
internal static IStep ReadStep()
in src/Agent.Listener/DistributedTask.Pipelines/Yaml/TypeConverters/ConverterUtil.steps.cs
224 38 2
private async Task RunAsync()
in src/Agent.Listener/Agent.cs
206 34 2
private async Task DownloadLatestAgent()
in src/Agent.Listener/SelfUpdater.cs
207 32 1
protected override async Task ProcessCommandInternalAsync()
in src/Agent.Plugins/PipelineArtifact/PipelineArtifactPluginV2.cs
205 32 2
public TestRunData ReadResults()
in src/Agent.Worker/TestResults/Legacy/JunitResultReader.cs
111 32 3
private async Task PublishAllTestResultsToSingleTestRunAsync()
in src/Agent.Worker/TestResults/Legacy/LegacyTestRunDataPublisher.cs
117 32 7
public TestRunData GetTestRunData()
in src/Agent.Worker/TestResults/Legacy/NunitResultReader.cs
91 31 5