awslabs / amazon-qldb-driver-python
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 106 units with 574 lines of code in units (77.5% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (82 lines of code)
    • 4 simple units (67 lines of code)
    • 100 very simple units (425 lines of code)
0% | 0% | 14% | 11% | 74%
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% | 14% | 11% | 74%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
pyqldb/driver0% | 0% | 58% | 0% | 41%
pyqldb/cursor0% | 0% | 0% | 30% | 69%
pyqldb/session0% | 0% | 0% | 47% | 52%
pyqldb/errors0% | 0% | 0% | 16% | 83%
pyqldb/util0% | 0% | 0% | 0% | 100%
pyqldb/communication0% | 0% | 0% | 0% | 100%
pyqldb/transaction0% | 0% | 0% | 0% | 100%
pyqldb/config0% | 0% | 0% | 0% | 100%
pyqldb/execution0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def __init__()
in pyqldb/driver/qldb_driver.py
54 16 14
def execute_lambda()
in pyqldb/driver/qldb_driver.py
28 11 3
def _execute_lambda()
in pyqldb/session/qldb_session.py
23 10 2
def is_retriable_exception()
in pyqldb/errors/__init__.py
9 9 1
def _populate_queue()
in pyqldb/cursor/read_ahead_cursor.py
20 8 1
def __next__()
in pyqldb/cursor/stream_cursor.py
15 7 1
def _hash_comparator()
in pyqldb/util/qldb_hash.py
10 5 2
def _get_session()
in pyqldb/driver/qldb_driver.py
21 5 2
def is_transaction_expired_exception()
in pyqldb/errors/__init__.py
6 4 1
def _accumulate()
in pyqldb/cursor/stream_cursor.py
9 4 4
def __init__()
in pyqldb/util/qldb_hash.py
4 4 2
def _join_hashes_pair_wise()
in pyqldb/util/qldb_hash.py
10 4 2
def __eq__()
in pyqldb/util/qldb_hash.py
4 3 2
def calculate_backoff()
in pyqldb/util/retry.py
8 3 4
def _to_ion()
in pyqldb/transaction/transaction.py
7 3 1
def close()
in pyqldb/driver/qldb_driver.py
8 3 1
def _release_session()
in pyqldb/driver/qldb_driver.py
9 3 2
def is_occ_conflict_exception()
in pyqldb/errors/__init__.py
5 2 1
def is_bad_request_exception()
in pyqldb/errors/__init__.py
5 2 1
def is_invalid_session_exception()
in pyqldb/errors/__init__.py
5 2 1