awslabs / amazon-qldb-driver-rust
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 35 units with 244 lines of code in units (18.5% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 3 medium size units (82 lines of code)
    • 1 small units (19 lines of code)
    • 31 very small units (143 lines of code)
0% | 0% | 33% | 7% | 58%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
rs0% | 0% | 33% | 7% | 58%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
amazon-qldb-driver-core/src0% | 0% | 33% | 7% | 58%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
fn on_err()
in amazon-qldb-driver-core/src/retry.rs
35 3 3
fn dot_examples()
in amazon-qldb-driver-core/src/qldb_hash.rs
26 1 0
fn exponential_backoff_with_jitter_seq()
in amazon-qldb-driver-core/src/retry.rs
21 2 0
fn partial_cmp()
in amazon-qldb-driver-core/src/qldb_hash.rs
19 5 2
fn buf_to_str()
in amazon-qldb-driver-core/src/ion_compat.rs
10 2 1
fn ion_hash_escape()
in amazon-qldb-driver-core/src/ion_compat.rs
10 3 1
fn new()
in amazon-qldb-driver-core/src/transaction.rs
9 1 3
fn default()
in amazon-qldb-driver-core/src/driver.rs
7 1 0
fn has_broken()
in amazon-qldb-driver-core/src/pool.rs
7 2 2
fn default()
in amazon-qldb-driver-core/src/execution_stats.rs
6 1 0
fn dont()
in amazon-qldb-driver-core/src/retry.rs
6 1 0
fn after()
in amazon-qldb-driver-core/src/retry.rs
6 1 1
fn new()
in amazon-qldb-driver-core/src/transaction.rs
6 1 2
fn nul_term()
in amazon-qldb-driver-core/src/ion_compat.rs
5 1 0
fn ion_hash_string()
in amazon-qldb-driver-core/src/ion_compat.rs
5 1 0
fn policies_are_send_and_sync()
in amazon-qldb-driver-core/src/retry.rs
5 1 0
fn timing_information()
in amazon-qldb-driver-core/src/execution_stats.rs
4 2 1
fn on_err()
in amazon-qldb-driver-core/src/retry.rs
4 2 3
fn exponential_backoff_with_jitter()
in amazon-qldb-driver-core/src/retry.rs
4 1 3
fn sha256()
in amazon-qldb-driver-core/src/qldb_hash.rs
4 1 1