opensearch-project / dashboards-notebooks
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 185 units with 2,691 lines of code in units (31.1% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (385 lines of code)
    • 4 simple units (466 lines of code)
    • 179 very simple units (1,840 lines of code)
0% | 0% | 14% | 17% | 68%
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% | 44% | 0% | 55%
tsx0% | 0% | 0% | 55% | 44%
kt0% | 0% | 0% | 9% | 90%
java0% | 0% | 0% | 0% | 100%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
dashboards-notebooks/server/routes0% | 0% | 82% | 0% | 17%
dashboards-notebooks/public/components0% | 0% | 0% | 55% | 44%
opensearch-notebooks/src/main0% | 0% | 0% | 9% | 90%
dashboards-notebooks/server/helpers0% | 0% | 0% | 0% | 100%
dashboards-notebooks/server/adaptors0% | 0% | 0% | 0% | 100%
dashboards-notebooks/poc/zeppelin0% | 0% | 0% | 0% | 100%
dashboards-notebooks/server/clusters0% | 0% | 0% | 0% | 100%
dashboards-notebooks/server0% | 0% | 0% | 0% | 100%
dashboards-notebooks/public0% | 0% | 0% | 0% | 100%
dashboards-notebooks/server/services0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
export function NoteRouter()
in dashboards-notebooks/server/routes/noteRouter.ts
190 15 1
export function ParaRouter()
in dashboards-notebooks/server/routes/paraRouter.ts
195 13 1
override fun doExecute()
in opensearch-notebooks/src/main/kotlin/org/opensearch/notebooks/action/PluginBaseAction.kt
41 10 3
render()
in dashboards-notebooks/public/components/notebook.tsx
372 8 0
fun validateUser()
in opensearch-notebooks/src/main/kotlin/org/opensearch/notebooks/security/UserAccessManager.kt
30 7 1
override fun toXContent()
in opensearch-notebooks/src/main/kotlin/org/opensearch/notebooks/model/Notebook.kt
23 6 2
function addTenantToURL()
in dashboards-notebooks/public/components/helpers/reporting_context_menu_helper.tsx
14 5 2
createParagraph = function()
in dashboards-notebooks/server/adaptors/default_backend.ts
32 5 2
fun getSearchAccessInfo()
in opensearch-notebooks/src/main/kotlin/org/opensearch/notebooks/security/UserAccessManager.kt
20 4 1
fun doesUserHasAccess()
in opensearch-notebooks/src/main/kotlin/org/opensearch/notebooks/security/UserAccessManager.kt
20 4 3
override fun toXContent()
in opensearch-notebooks/src/main/kotlin/org/opensearch/notebooks/model/NotebookDetails.kt
17 4 2
async function getTenantInfoIfExists()
in dashboards-notebooks/public/components/helpers/reporting_context_menu_helper.tsx
34 4 0
componentDidMount()
in dashboards-notebooks/public/components/notebook.tsx
15 4 0
fun validatePollingUser()
in opensearch-notebooks/src/main/kotlin/org/opensearch/notebooks/security/UserAccessManager.kt
7 3 1
fun getAllAccessInfo()
in opensearch-notebooks/src/main/kotlin/org/opensearch/notebooks/security/UserAccessManager.kt
12 3 1
fun update()
in opensearch-notebooks/src/main/kotlin/org/opensearch/notebooks/action/NotebookActions.kt
26 3 2
fun delete()
in opensearch-notebooks/src/main/kotlin/org/opensearch/notebooks/action/NotebookActions.kt
28 3 2
checkIfReportingPluginIsInstalled()
in dashboards-notebooks/public/components/notebook.tsx
31 3 0
export function NoteTable()
in dashboards-notebooks/public/components/note_table.tsx
117 3 1
updateParagraphInput = function()
in dashboards-notebooks/server/adaptors/default_backend.ts
20 3 3