microsoft / ApplicationInsights-node.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 362 units with 5,232 lines of code in units (67.2% of code).
    • 0 very complex units (0 lines of code)
    • 4 complex units (411 lines of code)
    • 19 medium complex units (833 lines of code)
    • 71 simple units (1,707 lines of code)
    • 268 very simple units (2,281 lines of code)
0% | 7% | 15% | 32% | 43%
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
ts0% | 7% | 15% | 32% | 43%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
Library0% | 8% | 18% | 29% | 44%
AutoCollection0% | 7% | 19% | 26% | 46%
AutoCollection/diagnostic-channel0% | 22% | 0% | 67% | 10%
Bootstrap0% | 0% | 12% | 32% | 55%
ROOT0% | 0% | 6% | 15% | 77%
TelemetryProcessors0% | 0% | 0% | 74% | 25%
Declarations/Contracts0% | 0% | 0% | 65% | 35%
Bootstrap/Helpers0% | 0% | 0% | 47% | 52%
Declarations/Metrics0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
public async send()
in Library/Sender.ts
171 41 2
public static trackRequest()
in AutoCollection/HttpDependencies.ts
85 32 2
function createDependencyData()
in AutoCollection/diagnostic-channel/SpanParser.ts
96 30 1
private static _getUrlFromRequestOptions()
in AutoCollection/HttpDependencyParser.ts
59 28 2
public static startOperation()
in AutoCollection/CorrelationContextManager.ts
65 25 1
constructor()
in Library/Config.ts
33 24 1
private parseHeaders()
in AutoCollection/HttpRequestParser.ts
43 23 2
public static makeRequest()
in Library/Util.ts
68 22 4
private _trackCpu()
in AutoCollection/Performance.ts
45 18 0
constructor()
in Library/Traceparent.ts
63 16 2
public getDependencyTelemetry()
in AutoCollection/HttpDependencyParser.ts
54 15 2
public static trackRequest()
in AutoCollection/HttpRequests.ts
33 15 3
private _loadJsonFile()
in Library/JsonConfig.ts
80 15 0
public static createQuickPulseEnvelope()
in Library/QuickPulseEnvelopeFactory.ts
25 15 4
public setDiskRetryMode()
in Library/Sender.ts
33 14 3
private _initialize()
in AutoCollection/HttpRequests.ts
65 13 0
public enable()
in AutoCollection/NativePerformance.ts
34 13 3
public static queryCorrelationId()
in Library/CorrelationIdManager.ts
64 12 2
public getRequestTelemetry()
in AutoCollection/HttpRequestParser.ts
36 11 1
private _getIp()
in AutoCollection/HttpRequestParser.ts
22 11 0