opensearch-project / opensearch-dashboards-test-library
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 44 units with 332 lines of code in units (90.2% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 0 medium complex units (0 lines of code)
    • 1 simple units (34 lines of code)
    • 43 very simple units (298 lines of code)
0% | 0% | 0% | 10% | 89%
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% | 0% | 10% | 89%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
common-utils/common-UI0% | 0% | 0% | 25% | 74%
common-utils/network0% | 0% | 0% | 0% | 100%
page-object-model/dashboard-page0% | 0% | 0% | 0% | 100%
common-utils0% | 0% | 0% | 0% | 100%
page-object-model/home-page0% | 0% | 0% | 0% | 100%
page-object-model/login-page0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
addFilterRetryFull()
in common-utils/common-UI/common-UI.js
34 6 4
addFilterRetrySelection()
in common-utils/common-UI/common-UI.js
23 4 4
importJSONDoc()
in common-utils/network/test-fixture-handler.js
30 3 2
addDashboardPanels()
in page-object-model/dashboard-page/dashboard-page.js
33 3 3
saveDashboardVisualization()
in page-object-model/dashboard-page/dashboard-page.js
15 3 3
removeFilter()
in common-utils/common-UI/common-UI.js
13 2 2
viewData()
in common-utils/misc-utils.js
8 2 1
importJSONMapping()
in common-utils/network/test-fixture-handler.js
16 2 1
clearJSONMapping()
in common-utils/network/test-fixture-handler.js
13 2 1
constructor()
in common-utils/common-UI/common-UI.js
3 1 1
_generateFilterSearchString()
in common-utils/common-UI/common-UI.js
3 1 1
setDateRange()
in common-utils/common-UI/common-UI.js
13 1 2
pinFilter()
in common-utils/common-UI/common-UI.js
4 1 2
removeAllFilters()
in common-utils/common-UI/common-UI.js
4 1 0
pieChartFilterOnSlice()
in common-utils/common-UI/common-UI.js
3 1 1
pieChartRemoveFilter()
in common-utils/common-UI/common-UI.js
4 1 1
checkElementExists()
in common-utils/common-UI/common-UI.js
3 1 2
checkElementDoesNotExist()
in common-utils/common-UI/common-UI.js
3 1 1
checkElementComponentDoesNotExist()
in common-utils/common-UI/common-UI.js
3 1 2
checkElementContainsValue()
in common-utils/common-UI/common-UI.js
5 1 3