aws-samples / amazon-qldb-dmv-sample-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 117 units with 1,068 lines of code in units (66.8% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (74 lines of code)
    • 4 medium size units (116 lines of code)
    • 25 small units (332 lines of code)
    • 87 very small units (546 lines of code)
0% | 6% | 10% | 31% | 51%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 6% | 10% | 31% | 51%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
pyqldbsamples0% | 7% | 11% | 30% | 50%
pyqldbsamples/qldb0% | 0% | 0% | 48% | 51%
pyqldbsamples/model0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def insert_and_verify_ion_types()
in pyqldbsamples/insert_ion_types.py
74 1 1
def verify_block()
in pyqldbsamples/get_block.py
37 5 2
def verify_registration()
in pyqldbsamples/get_revision.py
32 4 3
def read_export()
in pyqldbsamples/journal_s3_export_reader.py
25 3 2
def main()
in pyqldbsamples/register_drivers_license.py
22 2 1
def create_export_role()
in pyqldbsamples/export_journal.py
19 3 4
def register_new_drivers_license()
in pyqldbsamples/register_drivers_license.py
18 3 3
def main()
in pyqldbsamples/export_journal.py
18 4 1
def create_export()
in pyqldbsamples/export_journal.py
15 2 7
def main()
in pyqldbsamples/validate_qldb_hash_chain.py
15 3 1
def previous_primary_owners()
in pyqldbsamples/query_history.py
14 3 2
def main()
in pyqldbsamples/create_index.py
14 2 1
def list_journal_export_with_ledger_name()
in pyqldbsamples/list_journal_exports.py
14 4 1
def renew_drivers_license()
in pyqldbsamples/renew_drivers_license.py
13 2 4
def from_ion()
in pyqldbsamples/qldb/journal_block.py
13 1 1
def main()
in pyqldbsamples/tag_resource.py
13 2 1
def main()
in pyqldbsamples/deletion_protection.py
13 3 1
def create_export_and_wait_for_completion()
in pyqldbsamples/export_journal.py
13 3 5
def update_record_and_verify_type()
in pyqldbsamples/insert_ion_types.py
13 4 4
def list_all_journal_exports()
in pyqldbsamples/list_journal_exports.py
13 4 0