microsoft / lsvmtools
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 902 units with 25,899 lines of code in units (58.5% of code).
    • 26 very long units (3,474 lines of code)
    • 116 long units (7,785 lines of code)
    • 307 medium size units (9,806 lines of code)
    • 200 small units (3,115 lines of code)
    • 253 very small units (1,719 lines of code)
13% | 30% | 37% | 12% | 6%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c13% | 30% | 38% | 11% | 5%
h0% | 0% | 0% | 36% | 63%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lsvmutils12% | 31% | 36% | 13% | 6%
lsvmload23% | 29% | 31% | 9% | 5%
lsvmtool10% | 30% | 47% | 8% | 2%
posix0% | 0% | 26% | 21% | 51%
striplic0% | 0% | 70% | 29% | 0%
posix/include0% | 0% | 0% | 22% | 77%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
EFI_STATUS efi_main()
in lsvmload/main.c
254 38 2
EXT2Err EXT2Rm()
in lsvmutils/ext2.c
184 27 2
static int _InjectFiles()
in lsvmutils/initrd.c
177 24 8
static int _crypt_command()
in lsvmtool/lsvmtoolmain.c
164 21 3
int ext2_main()
in lsvmtool/ext2main.c
161 27 2
int _PutFile()
in lsvmutils/vfat.c
142 25 5
int MeasurePolicy()
in lsvmutils/policy.c
137 15 6
TPM_RC TPM2X_Seal()
in lsvmutils/tpm2.c
137 12 9
int VFATInit()
in lsvmutils/vfat.c
136 30 2
static int _ResolveInitrd()
in lsvmutils/grubcfg.c
129 33 5
int ParseImage()
in lsvmutils/peimage.c
128 19 3
int MapEFIVFAT()
in lsvmload/efivfat.c
127 17 1
EFI_STATUS WrapBootBIO()
in lsvmload/bootbio.c
124 13 4
int LoadPolicy()
in lsvmutils/policy.c
122 25 3
TPM_RC TPM2X_BuildPolicy()
in lsvmutils/tpm2.c
122 16 7
121 18 2
int InitrdInjectFiles()
in lsvmutils/initrd.c
120 24 8
EFI_STATUS ApplyDBXUpdate()
in lsvmload/dbxupdate.c
119 15 4
int LoadEFIVar()
in lsvmutils/measure.c
119 22 4
int LoadDecryptCopySpecializeFile()
in lsvmload/specialize.c
111 18 4