microsoft / charticulator
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 2,063 units with 49,282 lines of code in units (40.3% of code).
    • 5 very complex units (1,661 lines of code)
    • 19 complex units (3,662 lines of code)
    • 79 medium complex units (8,581 lines of code)
    • 159 simple units (8,597 lines of code)
    • 1,801 very simple units (26,781 lines of code)
3% | 7% | 17% | 17% | 54%
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
ts4% | 8% | 14% | 14% | 58%
tsx1% | 5% | 22% | 22% | 47%
js0% | 0% | 0% | 40% | 59%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/app4% | 10% | 19% | 18% | 46%
src/core1% | 3% | 16% | 15% | 62%
src/worker0% | 0% | 0% | 28% | 71%
src/container0% | 0% | 0% | 14% | 85%
ROOT0% | 0% | 0% | 37% | 62%
src0% | 0% | 0% | 0% | 100%
src/fabric-icons0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
public renderLine()
in src/core/prototypes/plot_segments/axis.ts
373 77 5
public bindDataToAxis()
in src/app/stores/app_store.ts
297 70 1
export function renderGraphicalElementSVG()
in src/app/renderer/index.tsx
366 56 2
public setMissedSortProperties()
in src/app/stores/migrator.ts
246 56 1
export default function()
in src/app/stores/action_handlers/chart.ts
379 53 1
public build()
in src/app/template/index.ts
233 50 0
public handleDrag()
in src/app/views/canvas/snapping/session.ts
143 47 1
public addObject()
in src/app/template/index.ts
174 46 2
export default function()
in src/app/stores/action_handlers/mark.ts
225 39 1
export function getCenterByAngle()
in src/core/prototypes/plot_segments/region_2d/utils.ts
154 38 2
private getDefaultAnchor()
in src/app/views/panels/link_creator.tsx
300 35 7
public migrate()
in src/app/stores/migrator.ts
118 34 2
export default function()
in src/app/stores/action_handlers/document.ts
359 33 1
public getGraphics()
in src/core/prototypes/marks/textbox.ts
222 32 4
public updatePlotSegments()
in src/app/stores/app_store.ts
139 31 0
public hasUnsavedChanges()
in src/core/prototypes/state.ts
193 31 0
public setMissedGlyphRectProperties()
in src/app/stores/migrator.ts
89 30 1
public render()
in src/app/controllers/popup_controller.tsx
175 29 0
public render()
in src/app/views/panels/widgets/fluentui_value_editor.tsx
286 29 0
public renderControls()
in src/core/prototypes/plot_segments/region_2d/cartesian.ts
138 29 2