microsoft / inno-updater
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 50 units with 755 lines of code in units (46.5% of code).
    • 0 very long units (0 lines of code)
    • 3 long units (222 lines of code)
    • 10 medium size units (288 lines of code)
    • 9 small units (147 lines of code)
    • 28 very small units (98 lines of code)
0% | 29% | 38% | 19% | 12%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
rs0% | 30% | 36% | 20% | 12%
js0% | 0% | 85% | 0% | 14%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src0% | 40% | 34% | 21% | 4%
src/model0% | 0% | 47% | 8% | 43%
tools/legal0% | 0% | 85% | 0% | 14%
ROOT0% | 0% | 0% | 100% | 0%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
92 14 3
fn kill_process_if()
in src/process.rs
72 5 3
fn main()
in src/main.rs
58 16 0
fn move_update()
in src/main.rs
44 3 3
fn decode_strings>()
in src/model/filerec.rs
35 4 1
fn fill_buffer()
in src/blockio.rs
32 4 1
fn __main()
in src/main.rs
31 1 1
fn patch_uninstdat()
in src/main.rs
27 1 3
fn _main()
in src/main.rs
27 5 2
fn write_file()
in src/main.rs
26 2 3
async function main()
in tools/legal/main.js
23 5 1
fn from()
in src/model/filerec.rs
22 1 1
fn encode_strings>()
in src/model/filerec.rs
21 2 1
fn write()
in src/blockio.rs
20 3 2
fn update()
in src/main.rs
20 2 4
fn do_update()
in src/main.rs
19 1 3
fn read()
in src/blockio.rs
18 3 2
fn main()
in build.rs
16 1 0
fn flush_buffer()
in src/blockio.rs
15 2 1
fn parse()
in src/main.rs
14 3 1