opensearch-project / opensearch-dsl-py
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 409 units with 2,460 lines of code in units (67.8% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 10 medium complex units (235 lines of code)
    • 36 simple units (586 lines of code)
    • 363 very simple units (1,639 lines of code)
0% | 0% | 9% | 23% | 66%
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% | 0% | 9% | 23% | 66%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
opensearch_dsl0% | 0% | 10% | 23% | 66%
utils0% | 0% | 0% | 64% | 36%
opensearch_dsl/response0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def save()
in opensearch_dsl/index.py
34 16 2
def to_dict()
in opensearch_dsl/utils.py
21 15 1
def _setattr()
in opensearch_dsl/utils.py
20 13 3
def __init__()
in opensearch_dsl/wrappers.py
14 13 3
def update_from_dict()
in opensearch_dsl/search.py
29 12 2
def to_dict()
in opensearch_dsl/search.py
23 12 3
def get_analysis_definition()
in opensearch_dsl/analysis.py
25 12 1
def __and__()
in opensearch_dsl/query.py
27 12 2
def __getitem__()
in opensearch_dsl/search.py
16 11 2
def SF()
in opensearch_dsl/function.py
26 11 2
def A()
in opensearch_dsl/aggs.py
34 10 3
def __getattr__()
in opensearch_dsl/utils.py
26 10 2
def merge()
in opensearch_dsl/utils.py
21 10 3
def source()
in opensearch_dsl/search.py
18 9 3
def to_dict()
in opensearch_dsl/index.py
18 9 1
def update()
in opensearch_dsl/mapping.py
13 9 3
def to_dict()
in opensearch_dsl/utils.py
13 9 2
def __init__()
in opensearch_dsl/document.py
14 9 4
def __init__()
in opensearch_dsl/field.py
16 8 5
def _deserialize()
in opensearch_dsl/field.py
17 8 2