microsoft / node-diagnostic-channel
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 48 units with 571 lines of code in units (44.9% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (28 lines of code)
    • 9 simple units (278 lines of code)
    • 38 very simple units (265 lines of code)
0% | 0% | 4% | 48% | 46%
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% | 0% | 5% | 52% | 42%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/diagnostic-channel-publishers/src0% | 0% | 6% | 51% | 41%
src/diagnostic-channel/src0% | 0% | 0% | 54% | 45%
ROOT0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
function patchCallback()
in src/diagnostic-channel-publishers/src/pg.pub.ts
28 11 1
function postgres6PatchFunction()
in src/diagnostic-channel-publishers/src/pg.pub.ts
64 10 2
function patchCallback()
in src/diagnostic-channel-publishers/src/pg.pub.ts
31 10 1
const mongodb3PatchFunction: PatchFunction = function()
in src/diagnostic-channel-publishers/src/mongodb.pub.ts
33 8 1
const mongodb330PatchFunction: PatchFunction = function()
in src/diagnostic-channel-publishers/src/mongodb.pub.ts
34 8 1
export function makePatchingRequire()
in src/diagnostic-channel/src/patchRequire.ts
34 8 1
const mongodbPatchFunction: PatchFunction = function()
in src/diagnostic-channel-publishers/src/mongodb.pub.ts
36 6 1
public log()
in src/diagnostic-channel-publishers/src/winston.pub.ts
14 6 2
function patchedConfigure()
in src/diagnostic-channel-publishers/src/winston.pub.ts
10 6 0
public publish()
in src/diagnostic-channel/src/channel.ts
22 6 2
public unsubscribe()
in src/diagnostic-channel/src/channel.ts
12 5 3
const mongodbcorePatchFunction: PatchFunction = function()
in src/diagnostic-channel-publishers/src/mongodb-core.pub.ts
23 4 1
const mongodbcorePatchFunction = function()
in src/diagnostic-channel-publishers/src/mongodb.pub.ts
23 4 1
8 3 2
originalBunyan.prototype._emit = function()
in src/diagnostic-channel-publishers/src/bunyan.pub.ts
11 3 2
originalConsole[method] = function()
in src/diagnostic-channel-publishers/src/console.pub.ts
9 3 0
public shouldPublish()
in src/diagnostic-channel/src/channel.ts
7 3 1
function runNpmTask()
in gulpfile.js
15 2 2
tracerProvider.getTracer = function()
in src/diagnostic-channel-publishers/src/azure-coretracing.pub.ts
3 2 2
aiLoggingOutStream.write = function()
in src/diagnostic-channel-publishers/src/console.pub.ts
8 2 1