microsoft / fast
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 1,599 units with 16,761 lines of code in units (3.6% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 29 medium complex units (1,546 lines of code)
    • 100 simple units (3,175 lines of code)
    • 1,470 very simple units (12,040 lines of code)
0% | 0% | 9% | 18% | 71%
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% | 10% | 18% | 71%
js0% | 0% | 7% | 16% | 75%
tsx0% | 0% | 0% | 25% | 74%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
packages/web-components0% | 0% | 11% | 16% | 71%
packages/utilities0% | 0% | 8% | 23% | 68%
sites/website0% | 0% | 23% | 39% | 37%
packages/tooling0% | 0% | 0% | 44% | 55%
build/releasing0% | 0% | 0% | 60% | 39%
sites/fast-color-explorer0% | 0% | 0% | 11% | 88%
sites/fast-website0% | 0% | 0% | 14% | 85%
sites/fast-component-explorer0% | 0% | 0% | 0% | 100%
sites/site-utilities0% | 0% | 0% | 0% | 100%
build/testing0% | 0% | 0% | 0% | 100%
build0% | 0% | 0% | 0% | 100%
build/helpers0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
public handleKeydown()
in packages/web-components/fast-foundation/src/data-grid/data-grid.ts
88 22 1
public handleKeyDown()
in packages/web-components/fast-foundation/src/picker/picker.ts
93 22 1
export function calcSplices()
in packages/web-components/fast-element/src/observation/array-change-records.ts
80 20 6
export function quantizeHistogram()
in packages/utilities/fast-colors/src/color-quantization.ts
86 19 2
public handleKeydown()
in packages/web-components/fast-foundation/src/data-grid/data-grid-cell.ts
56 19 1
public compareTo()
in packages/web-components/fast-router/src/recognizer.ts
63 16 1
public keydownHandler()
in packages/web-components/fast-foundation/src/combobox/combobox.ts
60 15 1
public keydownHandler()
in packages/web-components/fast-foundation/src/listbox/listbox.ts
54 15 1
private setupRadioButtons()
in packages/web-components/fast-foundation/src/radio-group/radio-group.ts
59 14 0
public static fromDefinition()
in packages/web-components/fast-router/src/commands.ts
72 14 2
public map()
in packages/web-components/fast-router/src/routes.ts
50 14 1
public findNextColor()
in packages/utilities/fast-colors/src/color-scale.ts
47 13 6
private finishInitialization()
in packages/web-components/fast-element/src/components/controller.ts
34 13 0
public register()
in packages/web-components/fast-foundation/src/design-system/design-system.ts
74 13 1
private getEventInfo()
in packages/web-components/fast-router/src/links.ts
28 13 1
export function rescale()
in packages/utilities/fast-colors/src/color-palette.ts
46 12 3
function updateContentTarget()
in packages/web-components/fast-element/src/templating/binding.ts
42 12 2
function isArrayIndex()
in packages/web-components/fast-foundation/src/di/di.ts
30 12 1
public trim()
in packages/utilities/fast-colors/src/color-scale.ts
50 11 3
function spliceOperationsFromEditDistances()
in packages/web-components/fast-element/src/observation/array-change-records.ts
47 11 1