aws-samples / amazon-qldb-dmv-sample-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 117 units with 1,068 lines of code in units (66.8% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 0 medium complex units (0 lines of code)
    • 0 simple units (0 lines of code)
    • 117 very simple units (1,068 lines of code)
0% | 0% | 0% | 0% | 100%
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% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
pyqldbsamples0% | 0% | 0% | 0% | 100%
pyqldbsamples/qldb0% | 0% | 0% | 0% | 100%
pyqldbsamples/model0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def verify_block()
in pyqldbsamples/get_block.py
37 5 2
def main()
in pyqldbsamples/export_journal.py
18 4 1
def verify_registration()
in pyqldbsamples/get_revision.py
32 4 3
def main()
in pyqldbsamples/scan_table.py
11 4 1
def join_hash_pairwise()
in pyqldbsamples/verifier.py
10 4 2
def compare_journal_blocks()
in pyqldbsamples/validate_qldb_hash_chain.py
9 4 2
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
def list_journal_export_with_ledger_name()
in pyqldbsamples/list_journal_exports.py
14 4 1
def register_new_drivers_license()
in pyqldbsamples/register_drivers_license.py
18 3 3
def validate_and_update_registration()
in pyqldbsamples/transfer_vehicle_ownership.py
7 3 4
def block_response_to_string()
in pyqldbsamples/qldb/qldb_string_utils.py
7 3 1
def digest_response_to_string()
in pyqldbsamples/qldb/qldb_string_utils.py
7 3 1
def main()
in pyqldbsamples/connect_to_ledger.py
9 3 1
def is_secondary_owner_for_vehicle()
in pyqldbsamples/add_secondary_owner.py
10 3 3
def register_secondary_owner()
in pyqldbsamples/add_secondary_owner.py
8 3 3
def main()
in pyqldbsamples/deletion_protection.py
13 3 1
def does_bucket_exists()
in pyqldbsamples/export_journal.py
8 3 2
def create_s3_bucket_if_not_exists()
in pyqldbsamples/export_journal.py
12 3 2
def create_export_role()
in pyqldbsamples/export_journal.py
19 3 4