opensearch-project / opensearch-benchmark-workloads
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 35 units with 514 lines of code in units (80.1% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (71 lines of code)
    • 1 medium complex units (38 lines of code)
    • 3 simple units (60 lines of code)
    • 30 very simple units (345 lines of code)
0% | 13% | 7% | 11% | 67%
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
py0% | 13% | 7% | 11% | 66%
rb0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
noaa/_tools0% | 47% | 0% | 25% | 26%
nyc_taxis/_tools0% | 0% | 58% | 16% | 24%
http_logs0% | 0% | 0% | 25% | 74%
nested0% | 0% | 0% | 0% | 100%
geonames0% | 0% | 0% | 0% | 100%
nyc_taxis0% | 0% | 0% | 0% | 100%
geopointshape/_tools0% | 0% | 0% | 0% | 100%
geoshape/_tools0% | 0% | 0% | 0% | 100%
pmc0% | 0% | 0% | 0% | 100%
http_logs/_tools0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def processWeatherDoc()
in noaa/_tools/process.py
71 29 1
def to_json()
in nyc_taxis/_tools/parse.py
38 16 1
def loadStationsFile()
in noaa/_tools/process.py
38 8 3
def _replace_field()
in http_logs/workload.py
11 7 3
def to_geo_point()
in nyc_taxis/_tools/parse.py
11 7 2
def processWeatherFile()
in noaa/_tools/process.py
26 5 2
def on_after_load_workload()
in http_logs/workload.py
9 4 2
def register()
in http_logs/workload.py
12 4 1
def write_mappings()
in nyc_taxis/_tools/parse.py
13 4 0
def to_json()
in geopointshape/_tools/parse.py
11 4 1
def to_json()
in geoshape/_tools/parse.py
10 4 1
def wait_for_ml_lookback()
in nyc_taxis/workload.py
6 3 2
def on_prepare_workload()
in http_logs/workload.py
8 2 3
def register()
in nyc_taxis/workload.py
6 2 1
def __init__()
in geonames/workload.py
6 2 4
def params()
in geonames/workload.py
16 2 1
def params()
in geonames/workload.py
29 2 1
def params()
in geonames/workload.py
29 2 1
def __init__()
in nested/workload.py
12 2 4
def params()
in nested/workload.py
25 2 1