microsoft / DLWorkspace
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 4,015 units with 204,745 lines of code in units (86.0% of code).
    • 11 very complex units (2,119 lines of code)
    • 26 complex units (2,317 lines of code)
    • 263 medium complex units (13,079 lines of code)
    • 473 simple units (10,000 lines of code)
    • 3,242 very simple units (177,230 lines of code)
1% | 1% | 6% | 4% | 86%
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
js<1% | <1% | 4% | 2% | 91%
py2% | 3% | 17% | 19% | 56%
cs0% | 17% | 21% | 24% | 37%
cpp0% | 0% | 100% | 0% | 0%
go0% | 0% | 85% | 0% | 14%
ts0% | 0% | 0% | 7% | 92%
tsx0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/WebUI<1% | <1% | 4% | 2% | 90%
src/ClusterBootstrap8% | 6% | 16% | 21% | 46%
src/utils2% | 1% | 19% | 19% | 57%
src/ClusterManager0% | 2% | 21% | 17% | 58%
src/docker-images0% | 2% | 23% | 19% | 54%
src/StorageManager0% | 12% | 0% | 23% | 63%
src/RestAPI0% | 0% | 7% | 9% | 83%
src/dev-utils0% | 0% | 14% | 16% | 68%
src/user-synchronizer0% | 0% | 19% | 27% | 52%
src/RepairManager0% | 0% | 0% | 26% | 73%
src/RepairManagerAgent0% | 0% | 0% | 62% | 37%
src/dashboard0% | 0% | 0% | 2% | 97%
src/ClusterPortal0% | 0% | 0% | 0% | 100%
src/e2e-test0% | 0% | 0% | 0% | 100%
src/ARM0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def run_command()
in src/ClusterBootstrap/deploy.py
600 201 4
Url.prototype.resolveObject = function()
in src/WebUI/dotnet/WebPortal/wwwroot/js/elasticsearch-js/elasticsearch.angular.js
201 105 1
Url.prototype.resolveObject = function()
in src/WebUI/dotnet/WebPortal/wwwroot/js/elasticsearch-js/elasticsearch.jquery.js
201 105 1
Url.prototype.resolveObject = function()
in src/WebUI/dotnet/WebPortal/wwwroot/js/elasticsearch-js/elasticsearch.js
201 105 1
Url.prototype.parse = function()
in src/WebUI/dotnet/WebPortal/wwwroot/js/elasticsearch-js/elasticsearch.angular.js
172 65 3
Url.prototype.parse = function()
in src/WebUI/dotnet/WebPortal/wwwroot/js/elasticsearch-js/elasticsearch.jquery.js
172 65 3
Url.prototype.parse = function()
in src/WebUI/dotnet/WebPortal/wwwroot/js/elasticsearch-js/elasticsearch.js
172 65 3
def SubmitJob()
in src/utils/JobRestAPIUtils.py
145 55 1
function baseIsEqual()
in src/WebUI/dotnet/WebPortal/wwwroot/js/elasticsearch-js/elasticsearch.angular.js
85 51 6
function baseIsEqual()
in src/WebUI/dotnet/WebPortal/wwwroot/js/elasticsearch-js/elasticsearch.jquery.js
85 51 6
function baseIsEqual()
in src/WebUI/dotnet/WebPortal/wwwroot/js/elasticsearch-js/elasticsearch.js
85 51 6
public async Task Get()
in src/WebUI/dotnet/WebPortal/Controllers/dlwsController.cs
183 46 1
public OpenIDAuthentication()
in src/WebUI/dotnet/WebPortal/Helper/OpenIDAuthentication.cs
91 40 3
def parse_pod_item()
in src/docker-images/watchdog/src/watchdog.py
113 39 6
def gen_cluster_config()
in src/ClusterBootstrap/az_tools.py
180 35 3
def _walk()
in src/StorageManager/path_tree.py
85 35 2
public void Configure()
in src/WebUI/dotnet/WebPortal/Startup.cs
250 35 4
function exec()
in src/WebUI/dotnet/WebPortal/wwwroot/js/elasticsearch-js/elasticsearch.angular.js
96 35 4
function exec()
in src/WebUI/dotnet/WebPortal/wwwroot/js/elasticsearch-js/elasticsearch.jquery.js
96 35 4
function exec()
in src/WebUI/dotnet/WebPortal/wwwroot/js/elasticsearch-js/elasticsearch.js
96 35 4