opensearch-project / observability
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 330 units with 7,626 lines of code in units (24.6% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 12 medium complex units (2,188 lines of code)
    • 16 simple units (1,496 lines of code)
    • 302 very simple units (3,942 lines of code)
0% | 0% | 28% | 19% | 51%
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% | 47% | 10% | 42%
tsx0% | 0% | 27% | 32% | 39%
kt0% | 0% | 0% | 5% | 94%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
dashboards-observability/public/components0% | 0% | 29% | 28% | 42%
dashboards-observability/server/routes0% | 0% | 78% | 15% | 5%
opensearch-observability/src/main0% | 0% | 0% | 5% | 94%
dashboards-observability/server/adaptors0% | 0% | 0% | 18% | 81%
dashboards-observability/public/services0% | 0% | 0% | 12% | 87%
dashboards-observability/server/common0% | 0% | 0% | 0% | 100%
dashboards-observability/public0% | 0% | 0% | 0% | 100%
dashboards-observability/server0% | 0% | 0% | 0% | 100%
dashboards-observability/server/services0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
export function SpanDetailFlyout()
in dashboards-observability/public/components/trace_analytics/components/traces/span_detail_flyout.tsx
165 23 1
export function Dashboard()
in dashboards-observability/public/components/trace_analytics/components/dashboard/dashboard.tsx
186 20 1
export function DashboardTable()
in dashboards-observability/public/components/trace_analytics/components/dashboard/dashboard_table.tsx
354 19 1
export function PanelsRouter()
in dashboards-observability/server/routes/custom_panels/panels_router.ts
334 19 1
export function BoxPlt()
in dashboards-observability/public/components/trace_analytics/components/common/plots/box_plt.tsx
118 16 1
export function registerNoteRoute()
in dashboards-observability/server/routes/notebooks/noteRouter.ts
238 15 1
export function registerParaRoute()
in dashboards-observability/server/routes/notebooks/paraRouter.ts
235 13 1
export function getFieldTypeName()
in dashboards-observability/public/components/common/field_name/field_type_name.ts
52 12 1
export function getServiceMapGraph()
in dashboards-observability/public/components/trace_analytics/components/common/helper_functions.tsx
62 12 5
is reflected in the datetime functions()
in dashboards-observability/public/components/common/helpers/ppl_docs/language_structure/datatypes.ts
151 11 1
export function SpanDetailTable()
in dashboards-observability/public/components/trace_analytics/components/traces/span_detail_table.tsx
96 11 1
export function VisualizationsRouter()
in dashboards-observability/server/routes/custom_panels/visualizations_router.ts
197 11 1
function setIsSelected()
in dashboards-observability/public/components/common/side_nav.tsx
20 10 4
export function SpanDetailPanel()
in dashboards-observability/public/components/trace_analytics/components/traces/span_detail_panel.tsx
203 10 1
export function registerDslRoute()
in dashboards-observability/server/routes/dsl.ts
80 10 3
override fun doExecute()
in opensearch-observability/src/main/kotlin/org/opensearch/observability/action/PluginBaseAction.kt
45 10 3
export function FieldButton()
in dashboards-observability/public/components/common/field_button/field_button.tsx
54 8 12
render()
in dashboards-observability/public/components/notebooks/components/notebook.tsx
411 8 0
export function Services()
in dashboards-observability/public/components/trace_analytics/components/services/services.tsx
79 7 1
export function NoteTable()
in dashboards-observability/public/components/notebooks/components/note_table.tsx
227 7 1