awslabs / amazon-qldb-shell
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 76 units with 730 lines of code in units (34.0% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 8 medium size units (310 lines of code)
    • 9 small units (139 lines of code)
    • 59 very small units (281 lines of code)
0% | 0% | 42% | 19% | 38%
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% | 42% | 19% | 38%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/settings0% | 0% | 67% | 11% | 21%
src/results0% | 0% | 74% | 15% | 9%
src0% | 0% | 19% | 25% | 55%
src/command0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
fn try_from()
in src/settings/config.rs
48 9 1
fn build_table()
in src/results/table.rs
47 7 1
fn new_transaction()
in src/transaction.rs
44 4 1
fn format_element_for_cell()
in src/results/table.rs
43 2 1
fn try_from()
in src/settings/config.rs
41 6 1
fn try_from()
in src/settings/config.rs
34 4 1
fn validate_structure()
in src/repl_helper.rs
29 7 1
fn load_sample_config()
in src/settings/config.rs
24 1 0
fn user_input()
in src/ui.rs
20 3 1
fn ion_text_string()
in src/results/mod.rs
19 1 1
fn build_prompt()
in src/runner.rs
18 1 2
fn starts()
in src/repl_helper.rs
16 2 2
fn highlight_prompt()
in src/repl_helper.rs
15 3 3
fn completes()
in src/repl_helper.rs
14 2 2
fn set_prompt()
in src/ui.rs
13 1 2
fn default()
in src/settings/config.rs
12 1 0
fn config_dir_path()
in src/settings/config.rs
12 3 0
fn try_from()
in src/settings/config.rs
10 2 1
fn user_input()
in src/ui.rs
10 2 1
10 1 2