opensearch-project / opensearch-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 597 units with 6,627 lines of code in units (42.2% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 9 medium complex units (329 lines of code)
    • 22 simple units (433 lines of code)
    • 566 very simple units (5,865 lines of code)
0% | 0% | 4% | 6% | 88%
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% | 12% | 15% | 71%
pyi0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
opensearchpy0% | 0% | 29% | 10% | 60%
utils0% | 0% | 17% | 41% | 41%
opensearchpy/client0% | 0% | 1% | <1% | 97%
opensearchpy/helpers0% | 0% | 4% | 33% | 61%
opensearchpy/connection0% | 0% | 0% | 14% | 85%
opensearchpy/_async0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
opensearchpy/_async/client0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def default()
in opensearchpy/serializer.py
60 21 2
def perform_request()
in opensearchpy/transport.py
47 16 6
def query_params()
in opensearchpy/client/utils.py
34 15 1
def _normalize_hosts()
in opensearchpy/client/utils.py
28 14 1
def test_dist()
in utils/build-dists.py
89 13 1
def _resolve_request_args()
in opensearchpy/transport.py
24 13 4
def _process_bulk_chunk_success()
in opensearchpy/helpers/actions.py
15 12 4
def _escape()
in opensearchpy/client/utils.py
15 11 1
def resurrect()
in opensearchpy/connection_pool.py
17 11 2
def __init__()
in utils/generate-api.py
33 10 5
def all_parts()
in utils/generate-api.py
22 10 1
def download_artifact()
in utils/generate-api.py
25 10 1
def expand_action()
in opensearchpy/helpers/actions.py
50 10 1
def _get_sniff_data()
in opensearchpy/transport.py
26 9 2
def _log_trace()
in opensearchpy/connection/base.py
20 9 7
def find_files_to_fix()
in utils/license-headers.py
10 8 1
def set_connections()
in opensearchpy/transport.py
17 8 2
def feed()
in opensearchpy/helpers/actions.py
24 8 3
def _bulk_body()
in opensearchpy/client/utils.py
9 8 2
def does_file_need_fix()
in utils/license-headers.py
17 7 1