firecracker-microvm / versionize
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 55 units with 649 lines of code in units (66.4% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 7 medium size units (206 lines of code)
    • 23 small units (301 lines of code)
    • 25 very small units (142 lines of code)
0% | 0% | 31% | 46% | 21%
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% | 31% | 46% | 21%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src0% | 0% | 31% | 46% | 21%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
fn test_ser_de_option()
in src/primitives.rs
35 1 0
32 1 0
32 1 0
fn test_corrupted_string_len()
in src/primitives.rs
30 1 0
fn test_corrupted_vec_len()
in src/primitives.rs
29 1 0
fn test_app_versions_with_gap()
in src/version_map.rs
27 1 0
fn fmt()
in src/lib.rs
21 1 2
fn deserialize()
in src/primitives.rs
18 3 3
fn deserialize()
in src/primitives.rs
16 2 3
fn serialize()
in src/primitives.rs
16 3 4
fn serialize()
in src/primitives.rs
15 2 4
fn deserialize()
in src/primitives.rs
15 1 3
fn deserialize()
in src/primitives.rs
15 1 3
fn test_ser_de_wrapping()
in src/primitives.rs
15 1 0
fn test_100_app_version_full()
in src/version_map.rs
14 3 0
fn test_crc_new()
in src/crc.rs
14 1 0
fn serialize()
in src/primitives.rs
14 1 4
fn test_ser_de_vec()
in src/primitives.rs
14 1 0
fn serialize()
in src/primitives.rs
13 1 4
fn test_string_limit()
in src/primitives.rs
12 1 0