opensearch-project / perftop
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 65 units with 751 lines of code in units (79.1% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (124 lines of code)
    • 6 simple units (160 lines of code)
    • 57 very simple units (467 lines of code)
0% | 0% | 16% | 21% | 62%
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% | 16% | 21% | 62%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lib/perf-top/rca/util/temperature-profile0% | 0% | 74% | 0% | 25%
lib/perf-top/metrics/util0% | 0% | 11% | 25% | 63%
lib/perf-top/rca/util0% | 0% | 0% | 30% | 69%
lib/perf-top/metrics0% | 0% | 0% | 100% | 0%
lib/perf-top0% | 0% | 0% | 0% | 100%
lib/perf-top/rca0% | 0% | 0% | 0% | 100%
lib0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
function getData()
in lib/perf-top/rca/util/temperature-profile/generate-data.js
83 20 4
function getDataPerNode()
in lib/perf-top/metrics/util/generate-data.js
41 13 1
function()
in lib/perf-top/metrics/util/metric-line.js
49 9 1
function()
in lib/perf-top/rca/util/metric-table.js
18 7 1
function()
in lib/perf-top/rca/util/metric-line.js
27 7 1
function getMetricUnits()
in lib/perf-top/metrics/util/generate-data.js
22 7 2
function removeStaleData()
in lib/perf-top/metrics/util/generate-data.js
20 7 2
function initAndStart()
in lib/perf-top/metrics/generate-graphs.js
24 6 1
function initAndStart()
in lib/perf-top/rca/generate-graphs.js
22 5 1
function getURLOptions()
in lib/perf-top/helper.js
11 5 2
function getMetricData()
in lib/perf-top/metrics/util/generate-data.js
13 5 5
function addCommaDelimiter()
in lib/perf-top/metrics/util/generate-data.js
14 5 1
function getNodeData()
in lib/perf-top/metrics/util/generate-data.js
12 5 2
function getMetricData()
in lib/perf-top/rca/util/temperature-profile/generate-data.js
16 4 7
function aggregateMetricData()
in lib/perf-top/metrics/util/generate-data.js
21 4 1
function getDimensionData()
in lib/perf-top/metrics/util/generate-data.js
12 4 2
function()
in lib/perf-top/metrics/util/metric-table.js
17 4 1
generateMetricDonutData()
in lib/perf-top/rca/util/metric-donut.js
11 3 2
generateMetricTableData()
in lib/perf-top/rca/util/metric-table.js
11 3 2
function removeStaleData()
in lib/perf-top/rca/util/temperature-profile/generate-data.js
13 3 2