firecracker-microvm / kvm-bindings
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 254 units with 10,501 lines of code in units (79.1% of code).
    • 13 very long units (1,975 lines of code)
    • 65 long units (4,367 lines of code)
    • 104 medium size units (3,687 lines of code)
    • 0 small units (0 lines of code)
    • 72 very small units (472 lines of code)
18% | 41% | 35% | 0% | 4%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
rs18% | 41% | 35% | 0% | 4%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/x8618% | 41% | 35% | 0% | 4%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
276 1 0
fn bindgen_test_layout_kvm_regs()
in src/x86/bindings.rs
192 1 0
192 1 0
176 1 0
156 1 0
144 1 0
142 1 0
fn bindgen_test_layout_kvm_run()
in src/x86/bindings.rs
136 1 0
fn bindgen_test_layout_kvm_fpu()
in src/x86/bindings.rs
122 1 0
114 1 0
110 1 0
109 1 0
106 1 0
96 1 0
96 1 0
94 1 0
92 1 0
84 1 0
84 1 0
83 1 0