awslabs / amazon-qldb-driver-python
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 106 units with 574 lines of code in units (77.5% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (54 lines of code)
    • 3 medium size units (72 lines of code)
    • 2 small units (35 lines of code)
    • 100 very small units (413 lines of code)
0% | 9% | 12% | 6% | 71%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 9% | 12% | 6% | 71%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
pyqldb/driver0% | 38% | 35% | 0% | 26%
pyqldb/session0% | 0% | 47% | 0% | 52%
pyqldb/cursor0% | 0% | 0% | 30% | 69%
pyqldb/util0% | 0% | 0% | 0% | 100%
pyqldb/communication0% | 0% | 0% | 0% | 100%
pyqldb/errors0% | 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%
Alternative Visuals
Longest Units
Top 20 longest 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 _get_session()
in pyqldb/driver/qldb_driver.py
21 5 2
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 __init__()
in pyqldb/cursor/stream_cursor.py
10 1 4
def _hash_comparator()
in pyqldb/util/qldb_hash.py
10 5 2
def _join_hashes_pair_wise()
in pyqldb/util/qldb_hash.py
10 4 2
def _execute_statement()
in pyqldb/transaction/transaction.py
10 2 3
def is_retriable_exception()
in pyqldb/errors/__init__.py
9 9 1
def __init__()
in pyqldb/cursor/read_ahead_cursor.py
9 2 6
def _accumulate()
in pyqldb/cursor/stream_cursor.py
9 4 4
def _release_session()
in pyqldb/driver/qldb_driver.py
9 3 2
def _execute_statement()
in pyqldb/communication/session_client.py
8 1 4
def calculate_backoff()
in pyqldb/util/retry.py
8 3 4
def close()
in pyqldb/driver/qldb_driver.py
8 3 1
def _next_page()
in pyqldb/cursor/read_ahead_cursor.py
7 2 1
def __init__()
in pyqldb/cursor/buffered_cursor.py
7 2 2
def __init__()
in pyqldb/transaction/transaction.py
7 1 5