microsoft / tsiclient
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 645 units with 10,430 lines of code in units (48.4% of code).
    • 1 very complex units (142 lines of code)
    • 8 complex units (1,197 lines of code)
    • 42 medium complex units (2,354 lines of code)
    • 73 simple units (2,081 lines of code)
    • 521 very simple units (4,656 lines of code)
1% | 11% | 22% | 19% | 44%
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
ts1% | 11% | 20% | 21% | 45%
js0% | 9% | 45% | 6% | 38%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/UXClient/Models12% | 0% | 16% | 11% | 59%
src/UXClient/Components0% | 16% | 22% | 19% | 41%
src/packages/pikaday0% | 9% | 45% | 6% | 38%
src/UXClient/Utils0% | 0% | 18% | 37% | 43%
src/UXClient/Interfaces0% | 0% | 22% | 21% | 55%
src/ServerClient0% | 0% | 12% | 12% | 75%
src/UXClient0% | 0% | 0% | 87% | 12%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
public mergeDataToDisplayStateAndTimeArrays()
in src/UXClient/Models/ChartComponentData.ts
142 51 2
public render()
in src/UXClient/Components/LinePlot/LinePlot.ts
263 50 24
private brushEnd()
in src/UXClient/Components/LineChart/LineChart.ts
100 38 1
public async render()
in src/UXClient/Components/HierarchyNavigation/HierarchyNavigation.ts
187 32 3
public render()
in src/UXClient/Components/ModelSearch/ModelSearch.ts
159 30 4
render: function()
in src/packages/pikaday/pikaday.js
86 29 3
public render()
in src/UXClient/Components/AvailabilityChart/AvailabilityChart.ts
123 28 3
private createHierarchyItemElem()
in src/UXClient/Components/HierarchyNavigation/HierarchyNavigation.ts
126 26 2
public draw()
in src/UXClient/Components/Legend/Legend.ts
153 26 7
private renderTree()
in src/UXClient/Components/HierarchyNavigation/HierarchyNavigation.ts
80 25 4
config: function()
in src/packages/pikaday/pikaday.js
42 25 1
public render()
in src/UXClient/Components/PieChart/PieChart.ts
155 24 3
private renderScale()
in src/UXClient/Components/HeatmapCanvas/HeatmapCanvas.ts
78 22 0
public render()
in src/UXClient/Components/HeatmapCanvas/HeatmapCanvas.ts
101 19 8
renderTitle = function()
in src/packages/pikaday/pikaday.js
50 19 6
public render()
in src/UXClient/Components/Heatmap/Heatmap.ts
95 18 3
public async showInstance()
in src/UXClient/Components/HierarchyNavigation/HierarchyNavigation.ts
68 18 2
private getYExtent()
in src/UXClient/Components/LineChart/LineChart.ts
43 18 3
protected tooltipFormat()
in src/UXClient/Interfaces/ChartComponent.ts
82 18 4
static mergeSeriesForScatterPlot()
in src/UXClient/Utils/Utils.ts
66 18 2