opensearch-project / alerting-dashboards-plugin
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 362 units with 5,580 lines of code in units (28.9% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 4 medium complex units (294 lines of code)
    • 10 simple units (366 lines of code)
    • 348 very simple units (4,920 lines of code)
0% | 0% | 5% | 6% | 88%
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
js0% | 0% | 5% | 6% | 88%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
public/pages0% | 0% | 6% | 6% | 86%
public/components0% | 0% | 5% | 15% | 79%
server/routes0% | 0% | 0% | 0% | 100%
server/clusters0% | 0% | 0% | 0% | 100%
public0% | 0% | 0% | 0% | 100%
server/services0% | 0% | 0% | 0% | 100%
server0% | 0% | 0% | 0% | 100%
public/utils0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
componentDidUpdate()
in public/pages/CreateMonitor/containers/DefineMonitor/DefineMonitor.js
53 20 1
render()
in public/pages/Dashboard/containers/Dashboard.js
161 18 0
stopBrushing()
in public/components/Charts/Highlight/Highlight.js
24 13 1
async onRunQuery()
in public/pages/CreateMonitor/containers/DefineMonitor/DefineMonitor.js
56 13 0
export default function getScheduleFromMonitor()
in public/pages/MonitorDetails/components/MonitorOverview/utils/getScheduleFromMonitor.js
60 10 1
_clickedOutsideDrag()
in public/components/Charts/Highlight/Highlight.js
21 8 2
export function formikToBucketLevelTriggerAction()
in public/pages/CreateTrigger/containers/CreateTrigger/utils/formikToTrigger.js
42 8 1
_getDrawArea()
in public/components/Charts/Highlight/Highlight.js
25 7 2
onBrush()
in public/components/Charts/Highlight/Highlight.js
23 7 1
export function buildSchedule()
in public/pages/CreateMonitor/containers/CreateMonitor/utils/formikToMonitor.js
34 7 2
render()
in public/pages/Destinations/containers/CreateDestination/ManageSenders/ManageSenders.js
58 6 0
render()
in public/pages/Destinations/containers/CreateDestination/ManageEmailGroups/ManageEmailGroups.js
58 6 0
export default function monitorToFormik()
in public/pages/CreateMonitor/containers/CreateMonitor/utils/monitorToFormik.js
30 6 1
render()
in public/pages/CreateMonitor/components/VisualGraph/VisualGraph.js
15 6 0
function dotNotate()
in public/utils/SubmitErrorHandler.js
11 5 3
9 5 2
_getDragArea()
in public/components/Charts/Highlight/Highlight.js
10 5 2
_convertAreaToCoordinates()
in public/components/Charts/Highlight/Highlight.js
26 5 1
export function formikToTriggerUiMetadata()
in public/pages/CreateTrigger/containers/CreateTrigger/utils/formikToTrigger.js
36 5 2
export function getADCondition()
in public/pages/CreateTrigger/containers/CreateTrigger/utils/formikToTrigger.js
17 5 1