opensearch-project / opensearch-benchmark
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 1,558 units with 14,220 lines of code in units (84.7% of code).
    • 0 very complex units (0 lines of code)
    • 3 complex units (225 lines of code)
    • 38 medium complex units (2,086 lines of code)
    • 111 simple units (2,256 lines of code)
    • 1,406 very simple units (9,653 lines of code)
0% | 1% | 14% | 15% | 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% | 1% | 14% | 15% | 67%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
osbenchmark/workload0% | 9% | 17% | 20% | 52%
osbenchmark0% | 0% | 18% | 9% | 71%
osbenchmark/worker_coordinator0% | 0% | 17% | 14% | 67%
osbenchmark/builder0% | 0% | 9% | 19% | 70%
osbenchmark/utils0% | 0% | 1% | 27% | 70%
scripts0% | 0% | 0% | 53% | 46%
opensearch-benchmark-provisionconfigs/1.00% | 0% | 0% | 29% | 70%
opensearch-benchmark-provisionconfigs/main0% | 0% | 0% | 29% | 70%
osbenchmark/tracker0% | 0% | 0% | 9% | 90%
it0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def from_hyphenated_string()
in osbenchmark/workload/workload.py
83 41 2
def _create_corpora()
in osbenchmark/workload/loader.py
90 27 4
def on_after_load_workload()
in osbenchmark/workload/loader.py
52 26 2
def create_arg_parser()
in osbenchmark/benchmark.py
510 23 0
def load_plugin()
in osbenchmark/builder/provision_config.py
53 22 4
def as_flat_list()
in osbenchmark/metrics.py
63 21 1
def __init__()
in osbenchmark/workload/params.py
58 21 4
def __init__()
in osbenchmark/client.py
72 20 3
def dispatch_sub_command()
in osbenchmark/benchmark.py
113 19 3
def with_actor_system()
in osbenchmark/benchmark.py
60 18 2
def _create_test_procedures()
in osbenchmark/workload/loader.py
55 17 2
def schedule_for()
in osbenchmark/worker_coordinator/worker_coordinator.py
38 17 3
def may_complete_current_task()
in osbenchmark/worker_coordinator/worker_coordinator.py
22 16 2
def detailed_stats()
in osbenchmark/worker_coordinator/runner.py
60 16 3
def create()
in osbenchmark/builder/supplier.py
87 16 5
def _update()
in osbenchmark/builder/supplier.py
23 15 2
def _publish_transform_processing_times()
in osbenchmark/results_publisher.py
33 14 3
def download()
in osbenchmark/workload/loader.py
42 14 4
def read()
in osbenchmark/workload/loader.py
79 14 4
def __init__()
in osbenchmark/workload/params.py
32 14 4