microsoft / powerbi-visuals-utils-typeutils
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 142 units with 1,141 lines of code in units (69.8% of code).
    • 0 very complex units (0 lines of code)
    • 3 complex units (293 lines of code)
    • 1 medium complex units (35 lines of code)
    • 7 simple units (137 lines of code)
    • 131 very simple units (676 lines of code)
0% | 25% | 3% | 12% | 59%
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% | 25% | 3% | 12% | 59%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src0% | 29% | 0% | 11% | 59%
src/numericSequence0% | 41% | 14% | 18% | 25%
src/extensions0% | 0% | 0% | 7% | 92%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
60 47 1
export function log10()
in src/double.ts
130 35 1
public static calculate()
in src/numericSequence/numericSequence.ts
103 26 6
public static calculate()
in src/numericSequence/numericSequenceRange.ts
35 12 5
export function sequenceEqual()
in src/extensions/arrayExtensions.ts
19 8 4
constructor()
in src/valueType.ts
25 8 4
function toExtendedType()
in src/valueType.ts
23 8 2
public static calculateUnits()
in src/numericSequence/numericSequence.ts
35 6 4
private _ensureIncludeZero()
in src/numericSequence/numericSequenceRange.ts
10 6 0
public isCompatibleFrom()
in src/valueType.ts
10 6 1
15 6 1
export function pow10()
in src/double.ts
15 5 1
14 5 2
13 5 2
12 5 3
12 5 5
16 5 3
private _ensureNotEmpty()
in src/numericSequence/numericSequenceRange.ts
23 5 0
14 5 2
8 5 2