microsoft / maker.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 803 units with 8,411 lines of code in units (76.0% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 17 medium complex units (1,056 lines of code)
    • 55 simple units (1,376 lines of code)
    • 731 very simple units (5,979 lines of code)
0% | 0% | 12% | 16% | 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% | 12% | 15% | 71%
js0% | 0% | 0% | 46% | 53%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
maker.js/src/core0% | 0% | 11% | 16% | 71%
playground/src0% | 0% | 14% | 6% | 79%
maker.js/src/models0% | 0% | 19% | 36% | 44%
maker.js/debug0% | 0% | 0% | 47% | 52%
playground/src/worker0% | 0% | 0% | 9% | 90%
fonts0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
export function toSVG()
in packages/maker.js/src/core/svg.ts
154 23 2
export function setProcessedModel()
in packages/playground/src/playground.ts
66 19 2
constructor()
in packages/maker.js/src/core/paths.ts
72 18 1
constructor()
in packages/maker.js/src/models/Ellipse.ts
75 18 1
export function fillet()
in packages/maker.js/src/core/fillet.ts
65 17 4
function populateParams()
in packages/playground/src/playground.ts
127 17 1
export function mirror()
in packages/maker.js/src/core/model.ts
45 16 3
function walkRecursive()
in packages/maker.js/src/core/model.ts
42 16 5
export function findChains()
in packages/maker.js/src/core/chain.ts
63 13 2
function breakAlongForeignPath()
in packages/maker.js/src/core/combine.ts
48 13 3
constructor()
in packages/maker.js/src/models/BezierCurve.ts
72 13 1
function setParamIndex()
in packages/playground/src/playground.ts
35 13 3
onPath: function()
in packages/maker.js/src/core/chain.ts
48 12 1
export function childrenOnChain()
in packages/maker.js/src/core/layout.ts
29 11 6
export function distort()
in packages/maker.js/src/core/model.ts
36 11 5
function convertChainsTo2D()
in packages/maker.js/src/core/openjscad.ts
41 11 2
export function processResult()
in packages/playground/src/playground.ts
38 11 1
function swapBezierPathsWithSeeds()
in packages/maker.js/src/core/chain.ts
42 10 2
export function combine()
in packages/maker.js/src/core/combine.ts
37 10 7
export function dogbone()
in packages/maker.js/src/core/fillet.ts
44 10 4