microsoft / ApplicationInsights-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 995 units with 15,171 lines of code in units (59.8% of code).
    • 1 very complex units (439 lines of code)
    • 7 complex units (797 lines of code)
    • 68 medium complex units (3,052 lines of code)
    • 133 simple units (3,016 lines of code)
    • 786 very simple units (7,867 lines of code)
2% | 5% | 20% | 19% | 51%
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
ts3% | 5% | 22% | 18% | 49%
js0% | 3% | 9% | 26% | 60%
tsx0% | 0% | 0% | 27% | 72%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
extensions/applicationinsights-analytics-js55% | 0% | 0% | 14% | 30%
shared/AppInsightsCore0% | 10% | 25% | 20% | 42%
extensions/applicationinsights-debugplugin-js0% | 16% | 32% | 13% | 37%
tools/chrome-debug-extension0% | 13% | 20% | 26% | 40%
extensions/applicationinsights-dependencies-js0% | 11% | 31% | 12% | 44%
tools/release-tools0% | 15% | 24% | 30% | 29%
shared/AppInsightsCommon0% | 1% | 2% | 12% | 82%
channels/applicationinsights-channel-js0% | 0% | 32% | 24% | 42%
extensions/applicationinsights-properties-js0% | 0% | 64% | 2% | 33%
extensions/applicationinsights-clickanalytics-js0% | 0% | 23% | 32% | 44%
tools/rollup-es30% | 0% | 41% | 24% | 34%
AISKU/src0% | 0% | 23% | 26% | 50%
extensions/applicationinsights-perfmarkmeasure-js0% | 0% | 79% | 0% | 20%
tools/subResourceIntegrity0% | 0% | 65% | 31% | 2%
extensions/applicationinsights-react-native0% | 0% | 51% | 10% | 37%
tools/updateDistEsm0% | 0% | 45% | 31% | 23%
tools/shims0% | 0% | 17% | 28% | 54%
common/scripts0% | 0% | 0% | 35% | 64%
ROOT0% | 0% | 0% | 16% | 83%
scripts0% | 0% | 0% | 100% | 0%
tools/rollup-plugin-uglify3-js0% | 0% | 0% | 66% | 33%
AISKU/snippet0% | 0% | 0% | 10% | 89%
extensions/applicationinsights-react-js0% | 0% | 0% | 0% | 100%
AISKULight0% | 0% | 0% | 0% | 100%
AISKULight/dist-history0% | 0% | 0% | 0% | 100%
AISKU0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
constructor()
in extensions/applicationinsights-analytics-js/src/JavaScriptSDK/ApplicationInsights.ts
439 99 0
function parseArgs()
in tools/release-tools/setVersion.js
76 48 0
export function formatLogElements()
in tools/chrome-debug-extension/src/helpers.ts
166 42 8
export function formatLogElements()
in extensions/applicationinsights-debugplugin-js/src/components/helpers.ts
166 38 8
constructor()
in extensions/applicationinsights-dependencies-js/src/ajax.ts
112 35 0
export function createCookieMgr()
in shared/AppInsightsCore/src/JavaScriptSDK/CookieMgr.ts
96 33 2
constructor()
in shared/AppInsightsCore/src/JavaScriptSDK/BaseCore.ts
140 29 0
canIncludeCorrelationHeader()
in shared/AppInsightsCommon/src/Util.ts
41 26 3
function _isDisabledRequest()
in extensions/applicationinsights-dependencies-js/src/ajax.ts
43 24 3
constructor()
in extensions/applicationinsights-dependencies-js/src/ajaxRecord.ts
93 24 3
function _serializeObject()
in channels/applicationinsights-channel-js/src/Serializer.ts
63 21 2
constructor()
in extensions/applicationinsights-debugplugin-js/src/DebugPlugin.ts
136 21 0
constructor()
in extensions/applicationinsights-properties-js/src/Context/User.ts
71 21 2
export function formatError()
in tools/rollup-es3/src/es3/FormatError.ts
59 21 7
public capturePageAction()
in extensions/applicationinsights-clickanalytics-js/src/events/PageAction.ts
41 20 4
function _getStackFromErrorObj()
in shared/AppInsightsCommon/src/Telemetry/Exception.ts
39 20 1
function _extractPartAExtensions()
in channels/applicationinsights-channel-js/src/EnvelopeCreator.ts
61 19 3
function _findPerfResourceEntry()
in extensions/applicationinsights-dependencies-js/src/ajax.ts
48 19 3
function _formatMessage()
in shared/AppInsightsCommon/src/Telemetry/Exception.ts
18 19 2
function calculateVersion()
in tools/release-tools/setVersion.js
41 19 1