microsoft / botbuilder-js
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 3,362 units with 49,181 lines of code in units (64.5% of code).
    • 21 very complex units (3,048 lines of code)
    • 30 complex units (3,054 lines of code)
    • 102 medium complex units (4,891 lines of code)
    • 298 simple units (8,285 lines of code)
    • 2,911 very simple units (29,903 lines of code)
6% | 6% | 9% | 16% | 60%
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
js23% | 21% | 2% | 5% | 46%
ts<1% | 1% | 12% | 20% | 65%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
tools/resourceManagement29% | 27% | <1% | 2% | 39%
libraries/adaptive-expressions3% | 0% | 11% | 14% | 70%
libraries/botbuilder-dialogs-adaptive0% | 3% | 21% | 17% | 57%
libraries/botbuilder-dialogs0% | 2% | 21% | 22% | 52%
libraries/botbuilder-lg0% | 3% | 14% | 27% | 53%
libraries/botbuilder-ai0% | 4% | 10% | 31% | 53%
libraries/botbuilder0% | 0% | 10% | 26% | 63%
tools/framework0% | 0% | 30% | 23% | 46%
libraries/botbuilder-core0% | 0% | 5% | 18% | 75%
libraries/botframework-connector0% | 0% | 8% | 26% | 65%
libraries/botbuilder-ai-orchestrator0% | 0% | 33% | 60% | 5%
testing/skills0% | 0% | 26% | 21% | 51%
libraries/botbuilder-dialogs-adaptive-testing0% | 0% | 5% | 10% | 83%
libraries/botbuilder-dialogs-declarative0% | 0% | 10% | 6% | 83%
generators/generator-botbuilder0% | 0% | 3% | 11% | 84%
libraries/botframework-config0% | 0% | 4% | 22% | 72%
libraries/botbuilder-azure0% | 0% | 0% | 31% | 68%
libraries/botframework-streaming0% | 0% | 0% | 18% | 81%
libraries/botbuilder-dialogs-adaptive-runtime0% | 0% | 0% | 21% | 78%
libraries/botframework-schema0% | 0% | 0% | 24% | 75%
libraries/botbuilder-azure-blobs0% | 0% | 0% | 20% | 79%
libraries/botbuilder-applicationinsights0% | 0% | 0% | 48% | 51%
testing/testbot0% | 0% | 0% | 10% | 89%
libraries/botbuilder-dialogs-adaptive-runtime-integration-azure-functions0% | 0% | 0% | 21% | 78%
tools/util0% | 0% | 0% | 8% | 91%
testing/browser-functional0% | 0% | 0% | 8% | 91%
tools/scripts0% | 0% | 0% | 0% | 100%
libraries/botbuilder-testing0% | 0% | 0% | 0% | 100%
libraries/botbuilder-repo-utils0% | 0% | 0% | 0% | 100%
libraries/botbuilder-stdlib0% | 0% | 0% | 0% | 100%
libraries/botbuilder-azure-queues0% | 0% | 0% | 0% | 100%
libraries/adaptive-expressions-ie110% | 0% | 0% | 0% | 100%
build/scripts0% | 0% | 0% | 0% | 100%
testing/functional0% | 0% | 0% | 0% | 100%
libraries/botbuilder-dialogs-adaptive-runtime-integration-restify0% | 0% | 0% | 0% | 100%
libraries/swagger0% | 0% | 0% | 0% | 100%
libraries/botbuilder-dialogs-adaptive-runtime-core0% | 0% | 0% | 0% | 100%
libraries/botbuilder-dialogs-adaptive-runtime-integration-express0% | 0% | 0% | 0% | 100%
testing/streaming-e2e0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
export function convertCSharpDateTimeToDayjs()
in libraries/adaptive-expressions/src/datetimeFormatConverter.ts
341 105 1
function _beginCreateOrUpdate()
in tools/resourceManagement/lib/resource/operations/resources.js
166 69 9
function _listByResourceGroup()
in tools/resourceManagement/lib/resource/operations/resources.js
139 67 3
function _validate()
in tools/resourceManagement/lib/resource/operations/deployments.js
168 64 5
function _beginCreateOrUpdate()
in tools/resourceManagement/lib/resource/operations/deployments.js
168 64 5
function _list()
in tools/resourceManagement/lib/resource/operations/deploymentOperations.js
143 61 4
function _listByResourceGroup()
in tools/resourceManagement/lib/resource/operations/deployments.js
132 60 3
function _list()
in tools/resourceManagement/lib/resource/operations/resources.js
121 59 2
function _get()
in tools/resourceManagement/lib/resource/operations/resources.js
134 58 8
function _get()
in tools/resourceManagement/lib/resource/operations/deploymentOperations.js
140 57 5
function _createOrUpdate()
in tools/resourceManagement/lib/resource/operations/resourceGroups.js
150 56 4
function _beginDeleteMethod()
in tools/resourceManagement/lib/resource/operations/resources.js
118 56 8
function _checkExistence()
in tools/resourceManagement/lib/resource/operations/resources.js
119 55 8
function _get()
in tools/resourceManagement/lib/resource/operations/deployments.js
136 54 4
function _exportTemplate()
in tools/resourceManagement/lib/resource/operations/deployments.js
136 54 4
function _list()
in tools/resourceManagement/lib/resource/operations/providers.js
114 52 2
function _list()
in tools/resourceManagement/lib/resource/operations/resourceGroups.js
114 52 2
function _checkExistence()
in tools/resourceManagement/lib/resource/operations/deployments.js
121 51 4
function _beginDeleteMethod()
in tools/resourceManagement/lib/resource/operations/deployments.js
120 51 4
function _update()
in tools/resourceManagement/lib/resource/operations/resourceGroups.js
134 51 4